kebabCase
ts
function String.kebabCase<T extends string>(
target: T,
): KebabCase<T>Converts target string to kebab-case format.
Example
ts
import { String } from "@monstermann/string";
String.kebabCase("hello world"); // "hello-world"
String.kebabCase("helloWorld"); // "hello-world"ts
import { String } from "@monstermann/string";
pipe("hello world", String.kebabCase()); // "hello-world"
pipe("helloWorld", String.kebabCase()); // "hello-world"