nano-clone

0.0.1 • Public • Published

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.

Package Sidebar

Install

npm i nano-clone

Weekly Downloads

0

Version

0.0.1

License

MIT

Last publish

Collaborators

  • atool