UNPKG

@lou.codes/predicates

Version:
16 lines (15 loc) 402 B
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;