TS-Scribe - v0.6.2
    Preparing search index...

    Function isEmptyValue

    • Checks if a given value is considered "empty". A value is considered empty if:

      • It is null or undefined.
      • It is an empty string or a string with only whitespace.
      • It is an empty array.
      • It is an empty object (no enumerable properties).

      Parameters

      • value: unknown

        The value to check.

      Returns boolean

      true if the value is considered empty based on the criteria above, otherwise false.

      isEmptyValue(null);             // true
      isEmptyValue(undefined); // true
      isEmptyValue(''); // true
      isEmptyValue(' '); // true
      isEmptyValue([]); // true
      isEmptyValue({}); // true
      isEmptyValue({ key: 'value' }); // false
      isEmptyValue([1, 2, 3]); // false
      isEmptyValue('Hello'); // false