added catalyst library

This commit is contained in:
Fran Jurmanović
2021-05-28 20:02:14 +02:00
parent e0756282b6
commit 95a729d7d0
17 changed files with 179 additions and 8 deletions

View File

@@ -0,0 +1,6 @@
export default function toKebabCase(text: string) {
return text
.replace(/([a-z])([A-Z])/g, "$1-$2")
.replace(/\s+/g, "-")
.toLowerCase();
}