Checks if a String contains only whitespace characters
Returns true if the String is empty
true
const result = isBlank("");console.log(result); // true
Returns true if the String contains only whitespace characters
const result = isBlank(" ");console.log(result); // true
Returns false if the String contains any non-whitespace character
false
const result = isBlank(" a ");console.log(result); // false
true if the String is empty or all characters are whitespace, otherwise false
the String to check
Generated using TypeDoc
Checks if a String contains only whitespace characters
Example
Returns
trueif the String is emptyExample
Returns
trueif the String contains only whitespace charactersExample
Returns
falseif the String contains any non-whitespace characterReturns
trueif the String is empty or all characters are whitespace, otherwisefalse