(str: string)
| 1 | export const camelCaseToWords = (str: string) => { |
| 2 | return str |
| 3 | .replaceAll('_', ' ') |
| 4 | .trim() |
| 5 | .replaceAll(/([A-Z])/g, ' $1') |
| 6 | .trim() |
| 7 | .replace(/^./, (str) => str.toUpperCase()) |
| 8 | .replaceAll(/\s./g, (str) => str.toUpperCase()); |
| 9 | }; |
no test coverage detected