@vsokolov/utils - v0.32.0
    Preparing search index...

    Function isTruthyAndNotEmpty

    • Checks whether a value is "truthy" and not an empty object or empty array.

      Rules:

      • Falsy values (false, 0, '', null, undefined, NaN) return false.
      • Empty arrays ([]) return false.
      • Empty objects ({}) return false.
      • All other values (non-empty arrays, non-empty objects, numbers, strings, booleans, etc.) return true.

      Parameters

      • value: unknown

        The value to check.

      Returns boolean

      true if the value is considered meaningful, otherwise false.