@f0c1s/shallow-clone-type-strict
v2018.11.12
Published
Clones an object type (shallow) and all the values are set to null. Strict because it clones only the hasOwnProperties' keys.
Downloads
2
Readme
Clones an object type (shallow) and all the values are set to null. Strict because it clones only the hasOwnProperties' keys.
Installation npm i @f0c1s/shallow-clone-type-strict
Usage const scts = require('@f0c1s/shallow-clone-type-strict') const o = { name: '', age: '', sex: '', address: { /* complex object */ }} scts(o) // returns { name: null, age: null, sex: null, address: null }