(value: string)
| 26 | const normalizeWord = (value: string): string => value.toLowerCase(); |
| 27 | |
| 28 | const toCamelCase = (value: string): string => { |
| 29 | const words = splitWords(value).map(normalizeWord); |
| 30 | if (words.length === 0) return "tool"; |
| 31 | const [first, ...rest] = words; |
| 32 | return `${first}${rest.map((p) => `${p[0]?.toUpperCase() ?? ""}${p.slice(1)}`).join("")}`; |
| 33 | }; |
| 34 | |
| 35 | const toPascalCase = (value: string): string => { |
| 36 | const camel = toCamelCase(value); |
no test coverage detected