Skip to main content
function isUndefined
isUndefined(object: unknown): object is undefined
Deprecated

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

import util from 'node:util';

const foo = undefined;
util.isUndefined(5);
// Returns: false
util.isUndefined(foo);
// Returns: true
util.isUndefined(null);
// Returns: false

Parameters

object: unknown

Return Type

object is undefined
Back to top