trim-null
v1.0.1
Published
去除对象中值为null的项
Downloads
4
Readme
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-nullor
$ npm install trim-nullusage
import trimNull from 'trim-null';
trimNull([null, {a: null}]) // [undefined, {}]