clonedeep

2.0.0 • Public • Published

Deep Clone Build Status

A single method library used for cloning any sort of data structure in javascript!

NPM

Usage

// Import
const clone = require('deepClone');
 
let objectArray = [{ a: 0, b: 2}, { a: 3, b: 5}];
 
let clonedObjectArray = clone(objectArray);
 
objectArray[0][a] = 6;
// => [{ a: 6, b: 2}, { a: 3, b: 5}];
 
console.log(clonedObjectArray);
// => [{ a: 0, b: 2}, { a: 3, b: 5}]

Contributing

# Clone the project locally 
git clone git@github.com:joshghent/deepClone.git deepClone
 
# Change directory
cd deepClone
 
# Install dependancies
npm install
 
# Make your changes + add a test for the new feature or bug you found!
# then...
git add -A && git commit -m "Added an awwwwesome feature." && git push origin master

Finally submit a pull request and grab a cup of tea whilst pondering how kickass you feel to be part of the open source community!

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    5,187
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.0.0
    5,187
  • 1.2.0
    0
  • 1.0.0
    1

Package Sidebar

Install

npm i clonedeep

Weekly Downloads

4,343

Version

2.0.0

License

MIT

Last publish

Collaborators

  • joshghent