clon
v1.0.0
Published
Fast-clones an object using `JSON.parse(JSON.stringify(obj))`
Downloads
14
Readme
clon
Fast-clones an object using JSON.parse(JSON.stringify(obj))
Note: This function will throw if your object is not JSON serializable.
Example
var clon = require('clon')
var dup = clon({a: 1, b: 2})
console.log(dup) // {a: 1, b: 2}
License
MIT. See LICENSE for details.