npm install escloneA utility to deep copy ES6 types. Following are the supported types,
1. Json Object
2. Number
3. String
4. Boolean
5. Map
6. Set
7. Date
8. Array
All other types will be shallow copied.
1. Clone the repo
2. run the test using "npm test"
1. Node 5.4.0 and greater
npm install --savedev esclone
To use in any file add impport esclone,
import esclone from "esclone";
And then use,
const rockysGrandFather = {
name: "Rockys grand father",
father: "Don't know :("
};
const rockysFather = {
name: "Rockys Father",
father: rockysGrandFather
};
const rocky = {
name: "Rocky",
father: rockysFather
};
const rockyClone = esclone(rocky);
npm install --savedev esclone
npm run test
Tushar Dhole
This project is licensed under the MIT License - see the LICENSE.md file for details