made-in-common

structured-clone-es

A redistribution of @ungap/structured-clone that ships Node.js compatible ESM.

by made-in-common

TypeScript

TypeScript99.4%
JavaScript0.6%

Commit activity

Last 12 weeks · 1 commit

Full graph →

Community health

4 of 6 standards met

Community profile →
62
✓README✓License✓Contributing✓Code of Conduct○Issue Template○PR Template
antfu

Add generic type parameters to preserve input types through serialization. preserves the input type in return allows callers to specify expected type Properly type options parameter for Backward compatible change - all existing code continues to work.

antfu · 8mo ago
antfu

Make the exported function pure by removing its dependency on . It now always uses the serialize/deserialize implementation path. Simplify export to a pure function Remove globalThis checks and native delegation Update documentation to reflect pure implementation Remove global polyfill example (no longer delegates to native) All tests pass.

antfu · 8mo ago
antfu

Summary Port the @ungap/structured-clone source code directly into this repo with TypeScript support and modern tooling. Replaces unbuild with tsdown for bundling and adds comprehensive vitest test suite. Inlines the serialization/deserialization logic as the core of the package. Changes TypeScript conversion: Ported all source files (types, serialize, deserialize, json) to TypeScript with full type safety Build tooling: Replaced unbuild with tsdown for faster, simpler bundling and dts generation Testing: Added comprehensive vitest test suite covering all types, circular refs, lossy/json modes, and roundtrip scenarios Dependencies: Removed @ungap/structured-clone and @types/ungap__structured-clone; inlined source code Documentation**: Updated README with credits to original author, use cases (DevTools, RPC), and guidance on using native structuredClone() in modern envs Verification ✅ All 7 vitest tests pass ✅ TypeScript typecheck passes ✅ ESLint passes ✅ Build produces dist/index.js (6.15 kB minified) and dist/index.d.ts

antfu · 8mo ago
Structured data for AI agents

Repository: made-in-common/structured-clone-es. Description: A redistribution of @ungap/structured-clone that ships Node.js compatible ESM. Stars: 36, Forks: 0. Primary language: TypeScript. Languages: TypeScript (99.4%), JavaScript (0.6%). License: ISC. Latest release: v2.0.1 (4mo ago). Open PRs: 0, open issues: 0. Last activity: 1d ago. Community health: 62%. Top contributors: antfu, antfubot.