Skip to content

NanoPackage/nano-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published