Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
variable containsWhitespace
import { containsWhitespace } from "https://deno.land/x/30_seconds_of_typescript@v1.0.1/util.ts";

Returns true if the given string contains any whitespace characters, false otherwise.

Use RegExp.prototype.test() with an appropriate regular expression to check if the given string contains any whitespace characters.

type

(str: string) => unknown