isFalsy
Checks if a value is falsy (false, null, undefined, 0, "", NaN).
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
value | unknown | The value to check |
Returns
Section titled “Returns”value is Falsy — True if the value is falsy
Examples
Section titled “Examples”Check falsy values
Section titled “Check falsy values”Returns true for all falsy values: false, null, undefined, 0, "", NaN.
Related Types
Section titled “Related Types”Union of all falsy types in JavaScript.
Note: NaN cannot be represented as a type in TypeScript.
