@gyumeijie/jsoc
v1.1.0
Published
clone a javascript object
Downloads
2
Maintainers
Readme
jsoc
Clone or Copy a JavaScript Object.
Install
$ npm install @gyumeijie/jsoc
Usage
const clone = require('@gyumeijie/jsoc');
let a = { foo: { bar: 'baz' } };
let b = clone(a);
a.foo.bar = 'foo';
console.log(a); // { foo: { bar: 'foo' } }
console.log(b); // { foo: { bar: 'baz' } }
License
MIT © Gyumeijie