JS Utils Kit
    Preparing search index...

    Variable KEBAB_CASE_REGEXConst

    KEBAB_CASE_REGEX: RegExp = ...

    Matches strict kebab-case strings.

    A valid kebab-case string:

    • Contains only lowercase letters (a-z) and numbers (0-9)
    • Words are separated by single hyphens (-)
    • Does not start or end with a hyphen
    • Does not contain consecutive hyphens
    KEBAB_CASE_REGEX.test("hello-world"); // true
    KEBAB_CASE_REGEX.test("my-variable-123"); // true

    KEBAB_CASE_REGEX.test("Hello-world"); // false
    KEBAB_CASE_REGEX.test("hello_world"); // false
    KEBAB_CASE_REGEX.test("-hello-world"); // false
    KEBAB_CASE_REGEX.test("hello--world"); // false