Skip to content
On this page

isBlank

Identifies strings which only contain whitespace.

Usage

ts
import { isBlank } from '@screaming/utils'

isBlank('ribbit')
// false

isBlank('   ')
// true

isBlank('')
// true
1
2
3
4
5
6
7
8
9
10

Type Definitions

ts
/**
 * @param str - The string.
 * @returns If the string is blank.
 */
export declare function isBlank(str: string): boolean
1
2
3
4
5