Function isEmpty

  • Checks if a value is empty. A value is considered empty if it is:

    • null or undefined
    • A string or array with a length of 0
    • A Map or Set with a size of 0
    • An object with a length property that is 0
    • A plain object with no own enumerable properties

    Parameters

    • value: any

      The value to check for emptiness.

    Returns boolean

    true if the value is empty, otherwise false.