copyjs

1.0.0 • Public • Published

copyjs

copyjs copyjs is for deep copies of javascript objects

npm install copyjs
var a = {
  val: 15,
  business: 'isGood'
};

var b = copy(a);

#  object a { val: 15, business: 'isGood' }
#  object b { val: 15, business: 'isGood' }

b.val = 8000;
b.business = 'isBetter';

#  object a { val: 15, business: 'isGood' }
#  object b { val: 8000, business: 'isBetter' }

license: BSD

notes: I would have used https://npmjs.org/package/copy but I couldn't find/see their source Ok, that source is linked now https://github.com/evlun/copy and they even support packed arrays and buffers efficiently.

Package Sidebar

Install

npm i copyjs

Weekly Downloads

1

Version

1.0.0

License

BSD

Unpacked Size

22.7 kB

Total Files

9

Last publish

Collaborators

  • victusfate