Converts a string to kebab-case.
function toKebabCase( input: string): stringstringConverts a string to kebab-case.
stringstringConverts a string to kebab-case.
Replaces spaces, underscores, camelCase transitions, and other separators with dashes. It also preserves version tokens like "v2" and lowercases the result.
toKebabCase("hello world"); // "hello-world"
toKebabCase("first_name"); // "first-name"
toKebabCase("userProfile42"); // "user-profile-42"
toKebabCase("APIResponseV2"); // "api-response-v2"
toKebabCase("HTML5_Parser v3"); // "html-5-parser-v3"
toKebabCase(" Leading_and trailing "); // "leading-and-trailing"
