Skip to content

isWhitespace

isWhitespace(string) → boolean · String

Returns true if the string contains only whitespace characters (spaces, tabs, newlines).

  • string (required): string to test
utlx
isWhitespace("   ")                      // true
isWhitespace(" \t\n ")                   // true
isWhitespace("  a  ")                    // false
{
  blank: isWhitespace($input.field)
}

Released under AGPL-3.0.