Skip to main content

isNullOrUndefined

function isNullOrUndefined
Jump to headingisNullOrUndefined(object: unknown): object is null | undefined
Deprecated

Returns true if the given object is null or undefined. Otherwise, returns false.

import util from 'node:util';

util.isNullOrUndefined(0);
// Returns: false
util.isNullOrUndefined(undefined);
// Returns: true
util.isNullOrUndefined(null);
// Returns: true

Parameters Jump to heading

Jump to headingobject: unknown

Return Type Jump to heading

object is null | undefined
Back to top