@ndhoule/clone

Deeply clone an input object.

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
10May 9, 2016May 9, 2016Minified + gzip package size for @ndhoule/clone in KB

Readme

clone CI

Deeply clones a source object.

Installation

$ npm install @ndhoule/clone

API

clone(target : *) => *

Deeply copies an input object.

var a = { a: 1 };
var cloned = clone(a);

console.log(cloned); //=> { a: 1 }
console.log(cloned === a); //=> false

Acknowledgements

Based on component/clone.

License

Released under the MIT license.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.