@andjsrk/is-nullish
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i @andjsrk/is-nullish

Weekly Downloads

3

Version

1.1.0

License

none

Unpacked Size

1.08 kB

Total Files

6

Last publish

Collaborators

  • andjsrk