Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 484 Bytes

README.md

File metadata and controls

27 lines (17 loc) · 484 Bytes

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