(str: string)
| 25 | } |
| 26 | |
| 27 | export function toPascalCase(str: string): string { |
| 28 | if (isAllUpperCase(str)) return str; |
| 29 | return str.replace(/[_\- ]+(\w)/g, (_, c) => c.toUpperCase()).replace(/^\w/, (c) => c.toUpperCase()); |
| 30 | } |
| 31 | |
| 32 | export function toCamelCase(str: string): string { |
| 33 | if (isAllUpperCase(str)) return str; |
no test coverage detected