clone-component

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

3 个版本
安装
npm install clone-component
yarn add clone-component
pnpm add clone-component
bun add clone-component
README

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-28
0.2.0 2014-01-27
0.1.0 2012-10-18