@f0c1s/shallow-clone-type-strict

2018.11.12 • Public • Published

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 }

Readme

Keywords

none

Package Sidebar

Install

npm i @f0c1s/shallow-clone-type-strict

Weekly Downloads

1

Version

2018.11.12

License

ISC

Unpacked Size

865 B

Total Files

3

Last publish

Collaborators

  • iamanubhavsaini
  • sainianubhav