object deep clone component
JavaScript Makefile
Switch branches/tags
Latest commit d77e5cf Jul 21, 2016 @dominicbarnes dominicbarnes Release 0.2.3
Permalink
Failed to load latest commit information.
test add tests around cloning functions May 7, 2013
.gitignore initial commit Oct 18, 2012
History.md Release 0.2.3 Jul 21, 2016
Makefile initial commit Oct 18, 2012
Readme.md Release 0.1.0 Oct 18, 2012
component.json Release 0.2.3 Jul 21, 2016
index.js use safer Object.prototype.hasOwnProperty Jul 21, 2016
package.json Release 0.2.3 Jul 21, 2016

Readme.md

clone

Object clone supporting date, regexp, array and object types.

Example

var obj = clone({
  a: 'b',
  c: [
    new Date(),
    'tobi',
    'jane'
  ]
})

API

clone(obj)

Clones obj recursively and returns it.

License

MIT