npm.io
0.5.0 • Published 6 years ago

@pansy/is-nil

Licence
MIT
Version
0.5.0
Deps
0
Size
4 kB
Vulns
0
Weekly
0

@pansy/is-nil

判断当前值是否为null或undefined

安装

// npm
npm install @pansy/is-nil --save

// yarn
yarn add @pansy/is-nil

使用

import isNil from '@pansy/is-nil';

let value = null;
let value1 = undefined;

console.log(isNil(value)); // true
console.log(isNil(value1)); // true