clear-af.js
    Preparing search index...

    Function isEmpty

    • Function

      Check if any type of variable is empty

      Parameters

      • value: unknown

        The variable to check

      Returns boolean

      True if the value is empty, false otherwise

      isEmpty("");          // true
      isEmpty(" "); // true
      isEmpty(null); // true
      isEmpty([]); // true
      isEmpty({}); // true
      isEmpty("hello"); // false
      isEmpty([1, 2]); // false