For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /reference/predicate/isUndefined.md.

isUndefined es-toolkit

Checks if a given value is undefined.

const result = isUndefined(value);

Usage

isUndefined(value)

Use isUndefined when you want to check if a value is undefined. It's useful for checking whether a variable is initialized or whether an optional property exists.

import { isUndefined } from 'es-toolkit/predicate';

// undefined values
console.log(isUndefined(undefined)); // true
console.log(isUndefined(void 0)); // true

let uninitialized: string;
console.log(isUndefined(uninitialized)); // true

// Non-undefined values
console.log(isUndefined(null)); // false
console.log(isUndefined('')); // false
console.log(isUndefined(0)); // false
console.log(isUndefined(false)); // false
console.log(isUndefined({})); // false
console.log(isUndefined([])); // false

Parameters

valueunknownrequired

The value to check if it's undefined.

Returns

Returns true if the value is undefined, false otherwise.

value is undefined
Source: es-toolkit

Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.