Back to Explore

planttheidea/fast-copy

GitHub
8 updates · last 90 daysOpen source

Last release:

fast-copy is a JavaScript library for performing fast deep copies of objects, including support for circular references. It provides a simple `copy` function and a stricter `copyStrict` mode, and you can also build custom high-performance copiers with `createCopier` to override how specific types like arrays, maps, and sets are duplicated.

Project status

  • Actively maintained, with an upstream push and updates as recently as October 26, 2026.
  • Updates have been frequent in late August through October, with several in October, though the history also has gaps.

AI summary generated

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • v4.3.1

    Release 4.3.1 fixes copying of SharedArrayBuffer and DataView backing buffers, including preserving buffer contents and subclasses. It also routes DataView buffers through the configured copier, which changes how custom arrayBuffer methods and depth limits apply.

  • v4.3.0

    Release 4.3.0 expands strict-copy handling so more built-in types retain their own properties, including RegExp instances. It also updates development dependencies and adds repository funding links. The code contains additional behavior and internal export changes that are not stated in the release notes.

    Features
  • v4.2.0

    Release 4.2.0 focuses on improving deep-copy correctness, mainly around Date cloning in strict mode and preserving own __proto__ properties. It also includes documentation updates and dependency bumps (ip-address and serialize-javascript), plus added/cleaned test coverage to cover requested edge cases.

  • v4.1.2

    Release 4.1.2 focuses on a bugfix for copying DataView instances. The implementation and tests were updated so copied DataViews preserve the original view's byteOffset and byteLength, rather than copying and exposing the entire backing buffer.

    Breaking
  • v4.1.1

    Release 4.1.1 is a maintenance and bugfix release with changes focused on edge cases in the deep copy logic. The code changes also include build and tooling configuration updates, plus dependency bumps for the development toolchain.

  • v2.2.0

    Release 2.2.0 backports a deep recursion fix and adds repository hygiene around Yarn. The actual code change introduces a new recursion-depth limiter that changes failure behavior for extremely deeply nested inputs.

    SecurityFeatures
  • v3.1.0

    Release 3.1.0 release notes only mention a security port (#137 into v3 via #138), a maintenance upgrade to Yarn 4, and a changelog update. The actual code diff shows a much larger public API and typing refactor between v2.2.0 and v3.1.0, including new exported functions, changed function signatures, and new depth-bounding error behavior.

    Security
  • v4.1.0

    Release 4.1.0 claims a security fix for unbounded recursion when copying deeply nested instances. The code changes go further than the single release-note line, adding explicit depth bounding with a new error type, and refactoring the public copier option surface and internal state shape.

    Security
  • v4.0.4

    fast-copy 4.0.4 ships micro-optimizations to the object copying implementation, focusing on changing iteration patterns for potentially better performance. The release also includes maintenance build tooling updates and a broad set of development dependency bumps.

  • v4.0.3

    fast-copy v4.0.3 addresses incorrect copying behavior for BigInt typed arrays and updates documentation. The diff primarily changes the internal copier registry to correctly support BigInt64Array and BigUint64Array, adds a regression test for issue #128, and removes a README section about generator copying behavior.

  • v4.0.2

    Release v4.0.2 focuses on preventing Generator and AsyncGenerator values from being cloned or otherwise processed, ensuring they are handled as pass-through references instead. It also removes unused Vite and Vitest configuration files from the repo.

    Breaking
  • v4.0.1

    Release 4.0.1 is a maintenance and security-focused update that primarily targets TypeScript typing alignment (legacy vs built package outputs) and modernizes the project toolchain. It also updates dependencies for a transitive `glob` vulnerability and bumps `js-yaml` as part of the security remediation.

    SecurityFeatures
  • v4.0.0

    Release 4.0.0 introduces a major refactor of fast-copy's public API around createCopier, including a new options object shape (createCache, methods, strict) and an internal options layer. The code diff also removes multiple legacy environment fallbacks and changes the module exports to named exports.

    Features
  • v4.0.0-beta.3

    Release 4.0.0-beta.3 includes a small set of TypeScript definition changes described only as a “fix legacy types”. The code diff indicates multiple public API surface changes in index.d.ts, including export shape and option typing updates.

    Features
  • v4.0.0-beta.2

    Release 4.0.0-beta.2 adds build-time scripts that generate domain-specific TypeScript declaration files for ESM and CJS distributions. The build now produces .d.mts for ESM and .d.cts for CJS and adjusts package.json exports to reference these files.

    Features
  • v4.0.0-beta.1

    Release 4.0.0-beta.1 updates the TypeScript build configuration to use NodeNext module semantics broadly, and Node16 specifically for the CJS build. It also adjusts internal source and test imports to use explicit .ts specifiers, aligning with NodeNext/ESM extension handling.

  • v4.0.0-beta.0

    Release v4.0.0-beta.0 significantly modernizes fast-copy’s internals and public API surface. It removes legacy runtime fallbacks (notably around Symbol and RegExp.flags), reworks copier configuration around a unified createCopier options object, and updates exports toward named imports.

    BreakingFeatures
  • v3.0.2

    Release 3.0.2 makes a targeted change to the internal cloning utility to better handle a specific edge case involving an Empty class instance (referenced as coming from fast-querystring). The code change is small, and the release notes only mention this new support.