copy-anything
npmv4.1.0An 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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
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 // truecopy-anything vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| copy-anythingthis page | 20.3M | 1 | MIT | 21 days ago |
| rfdc | 53.7M | 3 | MIT | 11 days ago |
| type-fest | 385.6M | 6 | (MIT OR CC0-1.0) | 11 days ago |
| ts-node | 49.4M | 38 | MIT | 11 days ago |
| drizzle-orm | 20.3M | 0 | Apache-2.0 | 10 days ago |
| deepmerge | 0 | 5 | MIT | 11 days ago |
Dependencies
Declared by copy-anything v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (8)
Used by
Popular packages that depend on copy-anything.
Relationship graph
Dependencies (left) and dependents (right) of copy-anything.
Frequently installed together
An AST-based pattern checker for JavaScript.
Find and load configuration from a package.json property, rc file, TypeScript module, and more!
Packs ECMAScript/CommonJs/AMD modules for the browser. Allows you to split your codebase into multiple bundles, which can be loaded on demand. Supports loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
A high-level API to automate web browsers
BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
the most correct and second fastest glob implementation in JavaScript
Generates and consumes source maps
Turn node's process.version into something useful.
Display differences clearly so people can review changes confidently.
Make a directory and its parents if needed - Think `mkdir -p`
Bare bones Promises/A+ implementation
resolve like require.resolve() on behalf of files asynchronously and synchronously
Release history
4 releases in the last two years, typically about 16 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.1.0latest | 21 days ago | 19 KB | MIT |
| 4.0.5 | 1 year ago | 9.8 KB | MIT |
| 4.0.4 | 1 year ago | 9.0 KB | MIT |
| 4.0.3 | 1 year ago | 8.9 KB | MIT |
| 4.0.2 | 2 years ago | 8.9 KB | MIT |
| 4.0.1 | 2 years ago | 8.9 KB | MIT |
| 4.0.0 | 2 years ago | 9.1 KB | MIT |
| 3.0.5 | 3 years ago | 11 KB | MIT |
| 3.0.4 | 3 years ago | 12 KB | MIT |
| 3.0.3 | 3 years ago | 12 KB | MIT |
| 3.0.2 | 4 years ago | 12 KB | MIT |
| 3.0.1 | 4 years ago | 12 KB | MIT |
| 2.0.6 | 4 years ago | 12 KB | MIT |
| 3.0.0 | 4 years ago | 12 KB | MIT |
| 2.0.5 | 4 years ago | 12 KB | MIT |
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
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.