0.1.2 • Published 6 years ago

copy-data v0.1.2

Weekly downloads
2
License
ISC
Repository
github
Last release
6 years ago
npm install copy-data --save

Example

const copy = require('copy-data');
const obj = {
  coffee: ['iced', 'double', 'soy', 'vanilla'],
  nachos: true,
  pizza: 5,
  salad: null,
  sushi: 'always'
};

const objCopy = copy.object(obj);
console.log(obj === objCopy) // false

Included methods:

copy.array(arr);
copy.func(func);
copy.object(obj);
copy.string(string); // Still renders true, but I think it is because it checks value instead of memory location
0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago