1 export const kebabCase = (string: string): string =>
2 string
3 .replace(/([a-z])([A-Z])/g, "$1-$2")
4 .replace(/[\s_]+/g, "-")
5 .toLowerCase()