npm.io
1.0.8 • Published 3 years ago

smart-assign

Licence
ISC
Version
1.0.8
Deps
0
Size
4 kB
Vulns
0
Weekly
0

SmartAssign

a smarter version of Object.assign. deep assign when Object.assign is defined, otherwise, it will deep copy every property iteratively.

install

npm install --save smart-assign

usage example

'use strict'; __CODE_BLOCK_0__

tips

Objects without prototype can not be copied, can not be assigned, thus it will never change as the first parameter, and never be copied as other parameters