NewYour coding agent can read the release notes before it upgrades.Set up the MCP server β
npm, #2087 most downloaded on npm
An optimised way to copy'ing an object. A small and simple integration
Latest stable
4.1.5
Last release 1 months ago
30 Sep 2026
Release timing varies
gaps range from 2 weeks to 1.4 years
Most releases are documented
notes for 25 of 39 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
39 releases Β· first in 2018
Drag across the ruler to compare, or tap a release to open it.
chore: update dependencies 12056ed
Full Changelog: https://github.com/mesqueeb/copy-anything/compare/v4.1.4...v4.1.5
chore: jsr cli as a devDependency, called bare in the release script like bumpp eaa5bfc
Full Changelog: https://github.com/mesqueeb/copy-anything/compare/v4.1.3...v4.1.4
chore: bumpp --all so the rebuilt dist lands in the release commit 89b46d1
Your coding agent can read these notes before it upgrades. Set up the MCP server β
Full Changelog: https://github.com/mesqueeb/copy-anything/compare/v4.1.2...v4.1.3
chore: update dependencies baae06c
Full Changelog: https://github.com/mesqueeb/copy-anything/compare/v4.1.1...v4.1.2
Full Changelog: https://github.com/mesqueeb/copy-anything/compare/v4.1.0...v4.1.1
Full Changelog: https://github.com/mesqueeb/copy-anything/compare/v4.1.0...v4.1.1
chore: add benchmark, comparison tests, memory caps 7ff8345
feat: slightly improve types 8fc6fd5
the possible keys you can pass to copy(myObj, { props: ['someKey'] }) are now typed to be keyof typeof myObj
https://github.com/mesqueeb/copy-anything/compare/v4.0.4...v4.0.5
chore: update dependencies 48a2563
https://github.com/mesqueeb/copy-anything/compare/v4.0.3...v4.0.4
chore: update dependencies 5d89a5c
https://github.com/mesqueeb/copy-anything/compare/v4.0.2...v4.0.3
chore: update dependencies 530e209
https://github.com/mesqueeb/copy-anything/compare/v4.0.1...v4.0.2
Nothing published for this version
https://github.com/mesqueeb/copy-anything/compare/v3.0.5...v4.0.0
https://github.com/mesqueeb/copy-anything/compare/v3.0.5...v4.0.0
https://github.com/mesqueeb/copy-anything/compare/v3.0.4...v3.0.5
https://github.com/mesqueeb/copy-anything/compare/v3.0.4...v3.0.5
chore: update dependencies 1516359
types condition to the front (#25) b4b82f4https://github.com/mesqueeb/copy-anything/compare/v3.0.3...v3.0.4
chore: update dependencies 3cf9cd8
https://github.com/mesqueeb/copy-anything/compare/v3.0.2...v3.0.3
chore: update dependencies 82c8653
https://github.com/mesqueeb/copy-anything/compare/v3.0.1...v3.0.2
chore: fix npm dependency 2d40572
https://github.com/mesqueeb/copy-anything/compare/v3.0.0...v3.0.1
is now an esm package with "type": "module" in package.json
esm package with "type": "module" in package.jsonrevert node version requirement 54fd3f4
https://github.com/mesqueeb/copy-anything/compare/v2.0.4...v2.0.6
Nothing published for this version
build: rename "typings" β "types" 406b9fa
https://github.com/mesqueeb/copy-anything/compare/v2.0.3...v2.0.4
chore: update dependencies 6577901
https://github.com/mesqueeb/copy-anything/compare/v2.0.1...v2.0.3
Nothing published for this version
```js // before: import copy from 'copy-anything'
// before:
import copy from 'copy-anything'
// now:
import { copy } from 'copy-anything'
I was experiencing a lot of problems with just the default export depending on the environment: browser, different versions of nodeJS, rollup/webpack/parcel, ... and also depending on wether the CJS or ESM built file was imported.
Named exports work much more consistently throughout all environments! π
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
By default, copy-anything only copies enumerable properties. If you also want to copy non-enumerable properties you can do so by passing that as an op
By default, copy-anything only copies enumerable properties. If you also want to copy non-enumerable properties you can do so by passing that as an option.
const original = {name: 'Bulbasaur'}
// bulbasaur's ID is non-enumerable
Object.defineProperty(original, 'id', {
value: '001',
writable: true,
enumerable: false,
configurable: true
})
const copy1 = copy(original)
const copy2 = copy(original, {nonenumerable: true})
(copy1.id === undefined)
(copy2.id === '001')
You can limit to specific props.
const original = {name: 'Flareon', type: ['fire'], id: '136'}
const copy = copy(original, {props: ['name']})
(copy === {name: 'Flareon'})
Please note, if the props you have specified are non-enumerable, you will also need to pass
{nonenumerable: true}.
Enjoy!! π
Reverted the: Support for (non- &) enumerable props & symbols π¦
Reverted the: Support for (non- &) enumerable props & symbols π¦
The latest pushed branch is now: https://github.com/mesqueeb/copy-anything/tree/revert-to-1.2.4
Copy'ing non-enumerable props by default caused A LOT of applications of mine to crash because my copies were receiving those hidden props that were previously not there, which caused to break reactivity in many cases.
If you still need to copy (non- &) enumerable props & symbols then please set version to 1.3.0.
I need to think of the best way to make this optional instead.
The library now completely supports:
The library now completely supports:
enjoy!! π
<sub>--<br>copy-anything was made with β₯ by Luca Ban.<br>If this library helped you in any way you can support me by buying me <a href="https://www.buymeacoffee.com/mesqueeb">a cup of coffee</a>. βοΈ</sub>
Nothing published for this version
Nothing published for this version
Nothing published for this version
Now it not only clones objects, but also arrays as well as objects in arrays! See the updated readme!
Now it not only clones objects, but also arrays as well as objects in arrays! See the updated readme!
Enjoy!! π¦
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.