Skip to main content
isUndefined - util - Node documentation
function isUndefined

Usage in Deno

import { isUndefined } from "node:util";
isUndefined(object: unknown): object is undefined
Deprecated

Since v4.0.0 - Use value === undefined instead.

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