JS Utils Kit
    Preparing search index...

    Variable HAS_WHITESPACE_REGEXConst

    HAS_WHITESPACE_REGEX: RegExp = ...

    Matches if a string contains any whitespace character.

    Whitespace includes:

    • Spaces ( )
    • Tabs (\t)
    • Newlines (\n)
    • Carriage returns (\r)
    • Form feeds (\f)
    • Vertical tabs (\v)

    Pattern:

    • \s → any whitespace character
    HAS_WHITESPACE_REGEX.test("Hello World"); // true
    HAS_WHITESPACE_REGEX.test("Hello\tWorld"); // true
    HAS_WHITESPACE_REGEX.test("Hello\nWorld"); // true
    HAS_WHITESPACE_REGEX.test("HelloWorld"); // false