@bytebury/sauce - v1.13.0
    Preparing search index...

    Function isWhitespace

    • Determines if the given text is only comprised of whitespace.

      Parameters

      • text: string

      Returns boolean

      This is null | undefined safe. If you pass null | undefined then this will return true.

      isWhitespace(null); // true
      isWhitespace(" "); // true
      isWhitespace("\n\t"); // true
      isWhitespace("Hello"); // false