(str: string)
| 39 | } |
| 40 | |
| 41 | export function kebabOfStr(str: string): string { |
| 42 | return str |
| 43 | .replace(/([a-z0-9])([A-Z])/g, "$1-$2") // handle camelCase, PascalCase, and numbers followed by uppercase |
| 44 | .replace(/[\s_]+/g, "-") // replace spaces and underscores with hyphens |
| 45 | .toLowerCase(); |
| 46 | } |
| 47 | |
| 48 | export function kebabOfThemeStr(str: string): string { |
| 49 | return str |