Skip to main content

isUndefined

function isUndefined
Jump to headingisUndefined(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 Jump to heading

Jump to headingobject: unknown

Return Type Jump to heading

object is undefined
Back to top