clone-component

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

npm install clone-component
29 downloads in the last week
260 downloads in the last month

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

npm loves you