</>PackageGraphPackageGraph

copy-anything

npmv4.1.0

An optimised way to copy'ing an object. A small and simple integration

Safe to adopt

Yes — copy-anything scores well across adoption, maintenance, weight, supply chain, and licensing. 20.3M downloads per week and 1 known dependents. Last published 21 days ago. 4 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    20.3M downloads per week and 1 known dependents.

  • AMaintenance: grade A, Excellent.

    Last published 21 days ago. 4 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 19 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding copy-anything to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

19 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=18
Module format
ESM only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the copy-anything README.

import { copy } from 'copy-anything'

const original = { name: 'Ditto', type: { water: true } }
const copy = copy(original)

// now if we change a nested prop like the type
copy.type.water = false
// or add a new nested prop
copy.type.fire = true

// then the original object will still be the same:
original.type.water === true // true
original.type.fire === undefined // true

copy-anything vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
copy-anythingthis page20.3M1MIT21 days ago
rfdc53.7M3MIT11 days ago
type-fest385.6M6(MIT OR CC0-1.0)11 days ago
ts-node49.4M38MIT11 days ago
drizzle-orm20.3M0Apache-2.010 days ago
deepmerge05MIT11 days ago

Dependencies

Declared by copy-anything v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (8)

@cycraft/eslint ^0.4.4@cycraft/tsconfig ^0.1.2@vitest/coverage-v8 ^4.1.11del-cli ^7.0.0klona ^2.0.6lodash.clonedeep ^4.5.0np ^12.0.1vitest ^4.1.11

Used by

Popular packages that depend on copy-anything.

Relationship graph

Dependencies (left) and dependents (right) of copy-anything.

lesscopy-anything
copy-anything dependencies dependents

Frequently installed together

Release history

4 releases in the last two years, typically about 16 days apart.

Recent versions of copy-anything
VersionPublishedSizeLicense
4.1.0latest21 days ago19 KBMIT
4.0.51 year ago9.8 KBMIT
4.0.41 year ago9.0 KBMIT
4.0.31 year ago8.9 KBMIT
4.0.22 years ago8.9 KBMIT
4.0.12 years ago8.9 KBMIT
4.0.02 years ago9.1 KBMIT
3.0.53 years ago11 KBMIT
3.0.43 years ago12 KBMIT
3.0.33 years ago12 KBMIT
3.0.24 years ago12 KBMIT
3.0.14 years ago12 KBMIT
2.0.64 years ago12 KBMIT
3.0.04 years ago12 KBMIT
2.0.54 years ago12 KBMIT

Overview

copy-anything is an npm package that an optimised way to copy'ing an object. A small and simple integration. It is extremely widely used, with about 20.3M downloads per week and 1 known dependents in the graph. The latest version is 4.1.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need an optimised way to copy'ing an object. A small and simple integration and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (20.3M weekly downloads).
  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use copy-anything?

Yes — copy-anything scores well across adoption, maintenance, weight, supply chain, and licensing. 20.3M downloads per week and 1 known dependents. Last published 21 days ago. 4 releases in the last 2 years.

How do I install copy-anything?

Run `npm install copy-anything` to add copy-anything to your npm project.

What license is copy-anything released under?

copy-anything is distributed under the MIT license.

How popular is copy-anything?

copy-anything has approximately 20,265,676 downloads per week and 1 known dependent packages.

Is copy-anything still maintained?

The most recent release of copy-anything (v4.1.0) was published 21 days ago.

Does copy-anything run install scripts?

No. copy-anything does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.