Skip to content

isNull

Checks if a value is null.

Available since v2.0.0

import { isNull } from '@helpers4/guard';
// or, from the all-in-one package (same code, one install):
import { isNull } from 'helpers4/guard';
isNull(value: unknown): value is null
ParameterTypeDescription
valueunknownThe value to check

value is null — True if value is null

isNull(null)      // => true
isNull(undefined) // => false
isNull(0)         // => false

View source on GitHub