0.0.1 • Published 7 years ago
nano-clone v0.0.1
nano-clone
nano version for deep clone.
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.
0.0.1
7 years ago