1.0.1 • Published 3 years ago

trim-null v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

trim-null

null is unfriendly to destructuring assignment in Javascript, use trim-null to delete the entry which value is null in an object or transform to undefined if in an array.

install

$ yarn add trim-null

or

$ npm install trim-null

usage

import trimNull from 'trim-null';

trimNull([null, {a: null}]) // [undefined, {}]