0.0.1 • Published 7 years ago

nano-clone v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

nano-clone

nano version for deep clone.

Ver Build Status Coverage Status npm download

1. Usage

npm i --save nano-clone

Then import it.

import clone from 'nano-clone'; // ES6

var v = {
  a: 1,
  b: '2',
  c: new Date(),
  d: /\d/,
  e: null,
  f: undefined,
  x: [1, '2', new Date(), /\w/, null, undefined],
  y: {
    a: 1,
    b: '2',
    c: new Date(),
    d: /\d/,
    e: null,
    f: undefined,
    x: [1, '2', new Date(), /\w/, null, undefined]
  }
};

var cv = clone(v);

2. Test

npm i

npm t

License

ISC@hustcc.