isNil
Checks if the given value is null
or undefined
;
function isNil<T>(value: T | null | undefined): value is null | undefined;
Example
isNil(null); // true
isNil(undefined); // true
isNil(1); // false
Checks if the given value is null
or undefined
;
function isNil<T>(value: T | null | undefined): value is null | undefined;
isNil(null); // true
isNil(undefined); // true
isNil(1); // false