包详细信息

clone-component

component15.7k0.2.2

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

自述文件

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

更新日志

0.2.2 / 2014-03-06

  • fix require() call again

0.2.1 / 2014-03-01

  • make clone work in all environments FOR REAL
  • change npm name to component-clone

0.2.0 / 2014-01-27

  • make clone work in all environments

0.1.1 / 2014-01-07

  • add repo field to component.json
  • add tests around cloning functions
  • package: fixed package.json

0.1.0 / 2012-10-18

  • initial release