@tremendous/help
    Preparing search index...

    Function isPresent

    • Checks if a value is present.

      This function checks if a value is present (i.e., not empty). It uses the isEmpty function to perform the check.

      Type Parameters

      • T

        The type of the value.

      Parameters

      • value: undefined | null | string | T | Record<string, never>

        The value to check.

      Returns value is T

      • Returns true if the value is present, otherwise false.
      isPresent("text"); // true
      isPresent([1, 2, 3]); // true
      isPresent({ a: 1 }); // true
      isPresent(""); // false
      isPresent([]); // false
      isPresent({}); // false
      isPresent(new Map()); // false
      isPresent(new Set()); // false