mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
4 lines
128 B
TypeScript
4 lines
128 B
TypeScript
export const kebabCase = (str:string) => str
|
|
.replace(/([a-z])([A-Z])/g, "$1-$2")
|
|
.replace(/[\s_]+/g, '-')
|
|
.toLowerCase(); |