@annexe/nowt.isnil
v0.1.1
Published
A utility function to validate if a value is null or undefined
Downloads
6
Maintainers
Readme
@annexe/isnil
A Typescript utility function to assert whether a value is null or undefined.
Installation
To install @annexe/isnil:
Yarn
yarn add @annexe/isnil
NPM
npm install @annexe/isnil
Usage
import { isNil } from '@annexe/isnil';
console.log(isNil('3.142')); // logs FALSE
console.log(isNil(null)); // logs TRUE
console.log(isNil(undefined)); // logs TRUE