clean-jsdoc-theme TypeDoc APIv0.0.0

isBlank

isBlank(str: string): boolean

Source: string.ts:194

Checks if a string is empty or contains only whitespace

Parameters

  • str (string) — The input string

Returns

  • boolean — True if string is empty or whitespace only

Example

CODE
isBlank('') // true
isBlank('   ') // true
isBlank('hello') // false
isBlank('  hi  ') // false