(str: string = '')
| 1 | export const toSnakeCase = (str: string = '') => |
| 2 | str |
| 3 | .match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g) |
| 4 | ?.map((x) => x.toLowerCase()) |
| 5 | .join(',') |
| 6 | .split(','); |
| 7 | |
| 8 | export const toTitleCase = (str: string = '') => |
| 9 | str |
no outgoing calls
no test coverage detected
searching dependent graphs…