clone
clone copied to clipboard
deeply clone arbitrary objects in javascript
clone.js line 106: } else if (useBuffer && Buffer.isBuffer(parent)) { can you at least check if Buffer.isBuffer is a function ? I ended up with a failing clone.js in an...
This should fix https://github.com/pvorb/clone/issues/58
I have a custom class that extends from Map. This class is "DefaultMap", and provides a default value when an item is not found in the Map. It looks like...
The project says "deeply clone arbitrary objects", so `clone()` not working on HTML element objects seems like a bug. To reproduce the TypeError: `let someImage = new Image();` `let copiedImage...
It appears that Node.js `SecureContext` does not like `getOwnPropertyDescriptor` called on it. ``` TypeError: Method _external called on incompatible receiver # at Function.getOwnPropertyDescriptor () at _clone (/var/task/node_modules/clone/clone.js:156:24) at _clone (/var/task/node_modules/clone/clone.js:162:18)...
When copying a DOM object, following line fails: `child[i] = _clone(parent[i], depth - 1);` https://github.com/pvorb/clone/blob/e3f252d1eb24f4e269337098295604e266719d4d/clone.js#L156 `TypeError: The HTMLDivElement.align setter can only be used on instances of HTMLDivElement` It seems like...
1. Take [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File) object from `` 2. Try to clone ``` TypeError: Cannot assign to read only property 'size' of object '#' at _clone (clone.js:156) at _clone (clone.js:156) at _clone...
Hi, Looks like #36 introduced a bug where prototype properties that don't have a setter won't get copied, even if they are [writable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty). Example: ```javascript function X() { this.test =...
The clone function is appending functions to my code. My code looks like this ``` console.log(script) let input = clone(script) console.log('----------------') console.log(input) process.exit(0) ``` and outputs this (this first data...
If our Array.prototype contains custom functions then after cloning these functions are put directly to clonned array. This later causes some problems because they arent meant to be there.