1.0.4 • Published 4 years ago

clone-deep-js v1.0.4

Weekly downloads
4
License
MIT
Repository
github
Last release
4 years ago

clone-deep-js

npm version npm license npm repository npm author

clone-deep-js: Js objects or variables copy API, its useful to create deep copy of objects. (Helpful for arrays and objects)

Features

  • DeepClone

Support

All node versions

Installing

NPM

Using npm:

$ npm install clone-deep-js

Using bower:

$ bower install clone-deep-js

Using yarn:

$ yarn add clone-deep-js

Examples

>>const deepClone = require("clone-deep-js");
//Deep Clone--------------------------
>>var a = {"o1" : 10};
>>var b = deepClone(a);
>>a["o2"] = 20;

>>console.log(a)
>>{"o1" : 10, "o2" : 20}

>>console.log(b)
>>{"o1" : 10}

Similarly in arrays and inherated objects...

licence

MIT licence

Author

@rahulkumar310197