Socket
Book a DemoInstallSign in
Socket

trim-null

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

trim-null

去除对象中值为null的项

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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, {}]

Keywords

trim

FAQs

Package last updated on 26 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts