Function isEmpty

  • Checks if an array-like value is empty.

    Parameters

    • value: undefined | null | ArrayLike<unknown>

      The value to check.

    Returns boolean

    true if the value is nullish or empty, false otherwise.

    See

    isNotEmpty for the inverse of this.

    Example

    Basic usage

    isEmpty([]) // true
    isEmpty([1, 2]) // false

    isEmpty('') // true
    isEmpty('foo') // false

    isEmpty(null) // true
    isEmpty(undefined) // true

Generated using TypeDoc