clone icon indicating copy to clipboard operation
clone copied to clipboard

deeply clone arbitrary objects in javascript

Results 29 clone issues
Sort by recently updated
recently updated
newest added

Although cloning objects with private ('hash name') properties works, any subsequent method calls that access such a property will produce a `TypeError` along the lines of `Cannot write private member...

Axios produces a very large/complex object of the Request. When I was trying clone this object, I got `v8:internal errror`.

attempting to clone a vue component you get the following error: ```js Uncaught TypeError: Illegal invocation at _clone (clone.js?4a13:162) at _clone (clone.js?4a13:162) at _clone (clone.js?4a13:162) at _clone (clone.js?4a13:162) at _clone...

I am trying to clone an npm object like below. const obj1 = clone( require('an-npm-module')); const obj2 = clone( require('an-npm-module')); But after doing operations on both, the changes are reflected...

Unzip [clone-issue.zip](https://github.com/pvorb/clone/files/2450193/clone-issue.zip) and: ``` npm install ./node_modules/.bin/browserify test.js > bundle.js chromium-browser test.html ``` Got: ``` bundle.js:2206 Uncaught TypeError: Illegal invocation at _clone (bundle.js:2206) at clone (bundle.js:2246) at Object.30.clone (bundle.js:3077) at...

replaces https://github.com/pvorb/clone/pull/93 - but allows for the same kind of global modification of clone behaviour. add clone.globalopts containing _clone. If set, globalopts._clone is called with each item at the start...

The following clone test of an array containing a `WeakMap` produces an error: ```js // WeakMap test const options = { includeNonEnumerable: true }; let wm = new WeakMap(); let...

- [x] Add a meaningful entry to the changelog in the README.md. - [x] You can add yourself to the list of contributors in the package.json if you like. If...

The following code will run in node8, but break in node10 and node12. ``` const clone = require('clone'); const { URL } = require('url'); const url = new URL('https://example.com'); const...

Cloning an object that includes field 'toString' will have the following affect: before clone: ``` [ { a: 'aaa', toString: 'bbb' }, { a: 'ccc', toString: 'ddd' } ] ```...