Skip to main content

isNil

Checks if value is null or undefined.

API

function isNil(value: unknown): value is null | undefined;

Usage

import { isNil } from '@feedzai/js-utilities';

isNil(null)
// true

isNil(undefined)
// true

isNil(NaN)
// false