deep-cloning

1.1.0 • Public • Published

Deep-Cloning

Build Status Coverage Status bitHound Overall Score

NPM

A single method library for (deep) cloning any kind of data structure - like Object, Array, RegExp, Date as well as primitives.

Usage

Use the npm package deep-cloning to your project:

npm install --save deep-cloning
// Import
const deepClone = require('deepClone');

let arr = [{ a: 0, b: 2}, { a: 3, b: 5}];

let clonedArr = deepClone(arr);

arr[0][a] = 6;
// => [{a: 6, b: 2}, { a: 3, b: 5}];

console.log(clonedArr);
// => [{a: 0, b: 2}, { a: 3, b: 5}]

Package Sidebar

Install

npm i deep-cloning

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • kukiron