repo
replacements.fyi

// package

is-whitespace

type: "module"

// preferences

// replacements (1)

snippet::is-whitespace

Simple or drop-in replacement

This package is no longer necessary. You can check if a string contains only whitespace with RegExp or by trimming it and comparing it to an empty string.

// example

const isWhitespace = (str) => /^\s*$/.test(str);