@lou.codes/predicates
Version:
🧐 Predicate util functions
17 lines (16 loc) • 521 B
TypeScript
/**
* `typeof` "null" alias. This "patches" typeof so `null` is not `"object"` but
* `"null"` instead (rejected proposal for lack of backwards compatibility, more
* details [here](https://lou.cx/null-typeof)).
*
* @category Primitives
* @example
* ```typescript
* isNull(null); // true
* isNull(undefined); // false
* ```
* @returns `true` if the given value is a `null`, `false` otherwise.
*/
export declare const isNull: (
input: unknown,
) => input is import("@lou.codes/types").TypeOfDictionary["null"];