@lou.codes/predicates
Version:
🧐 Predicate util functions
16 lines (15 loc) • 402 B
TypeScript
import type { Nullish } from "@lou.codes/types";
/**
* Check if `input` is `undefined` or `null`.
*
* @category Primitives
* @example
* ```typescript
* isNullish(undefined); // true
* isNullish(null); // true
* isNullish(""); // false
* isNullish(42); // false
* ```
* @returns `true` if nullish, `false` otherwise.
*/
export declare const isNullish: (input?: unknown) => input is Nullish;