nano version for deep clone.
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);
npm i
npm t
ISC@hustcc.