Converts the string to kebab-case by removing punctuation, trimming extra spaces, converting to lowercase, and joining words with hyphens.
kebab-case
This is null | undefined safe. If you pass null | undefined then this will return "".
null | undefined
""
kebab(null); // ""kebab("Hello World!"); // "hello-world"kebab(" Clean THIS_up!! "); // "clean-this-up" Copy
kebab(null); // ""kebab("Hello World!"); // "hello-world"kebab(" Clean THIS_up!! "); // "clean-this-up"
Converts the string to
kebab-case
by removing punctuation, trimming extra spaces, converting to lowercase, and joining words with hyphens.