Returns a deep copy of an object or array of any depth. Returns x unchanged if it's a JavaScript primitive.
x
clone({ hello: 'world' });// => { hello: 'world' }clone('a simple string');// => 'a simple string'clone(null);// => null Copy
clone({ hello: 'world' });// => { hello: 'world' }clone('a simple string');// => 'a simple string'clone(null);// => null
Generated using TypeDoc
Returns a deep copy of an object or array of any depth. Returns
x
unchanged if it's a JavaScript primitive.