@lxfriday/deepcopy
v1.0.0
Published
deepcopy for javascript
Downloads
1
Readme
deepcopy
deep copy for javascript
install
npm i @lxfriday/deepcopy -S
# or
yarn add @lxfriday/deepcopy
params
one or more object
return
the deep copy result
usage
var deepCopy = require('deepcopy');
var obj = { a: 1, b: 2, c: { cc: 3 } };
var result = deepCopy({}, obj);
console.log(result.c === obj.c); // false
obj.c.cc = 15;
console.log(result.c.cc); // 3