Function isNullish

  • Check if input is undefined or null.

    Example

    isNullish(undefined); // true
    isNullish(null); // true
    isNullish(""); // false
    isNullish(42); // false

    Parameters

    • input: unknown = null

    Returns input is Nullish

    true if nullish, false otherwise.