Clone or Copy a JavaScript Object.
$ npm install @gyumeijie/jsoc
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' } }
MIT © Gyumeijie