(str: string)
| 30 | } |
| 31 | |
| 32 | export function toCamelCase(str: string): string { |
| 33 | if (isAllUpperCase(str)) return str; |
| 34 | return str.replace(/[_\- ]+(\w)/g, (_, c) => c.toUpperCase()).replace(/^\w/, (c) => c.toLowerCase()); |
| 35 | } |
| 36 | |
| 37 | export function toSnakeCase(str: string): string { |
| 38 | if (isAllUpperCase(str)) return str; |
no test coverage detected