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/isNaN.md.

isNaN

Checks if a value is NaN.

isNaN(NaN) // true
isNaN(42) // false

Usage

isNaN(value: unknown)

Checks if a value is NaN.

import { isNaN } from 'massaman'
// or:  import { isNaN } from 'massaman/predicate'

isNaN(NaN) // true
isNaN(42) // false

Parameters

valueunknownrequired

the value to test.

Returns

whether value is the numeric NaN value; a true result narrows it to number.

value is number