1.1.0 • Published 3 years ago
@andjsrk/is-nullish
Licence
—
Version
1.1.0
Deps
0
Size
1 kB
Vulns
0
Weekly
0
is-nullish
Returns true if the given value is null or undefined
Install
$ npm install @andjsrk/is-nullish
Usage
// for CommonJS
const isNullish = require('@andjsrk/is-nullish')
// for ESM
import isNullish from '@andjsrk/is-nullish'
isNullish(null) // true
isNullish(undefined) // true
isNullish(0) // false
isNullish("") // false
isNullish(false) // false
isNullish([]) // false
isNullish({}) // false