isNil es-toolkit
Checks if a value is null or undefined.
Usage
isNil(value)
Use isNil when you want to check if a value is null or undefined.
It can also be used as a type guard in TypeScript:
Parameters
valueunknownrequired
The value to check if it's null or undefined.
Returns
Returns true if the value is null or undefined, false otherwise.
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.