(str: string)
| 16 | * @returns The string with spaces inserted before capital letters and converted to lowercase. |
| 17 | */ |
| 18 | export function camelCaseToWords(str: string): string { |
| 19 | return str |
| 20 | .replace(/([A-Z])/g, " $1") |
| 21 | .trim() |
| 22 | .toLowerCase(); |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Converts a string with words separated by spaces to camelCase. |
no outgoing calls
no test coverage detected