(str: string)
| 37 | } |
| 38 | |
| 39 | export function customCamelCaseGraphqlKey(str: string) { |
| 40 | return str |
| 41 | .replace(/([a-z])([A-Z])/g, '$1_$2') |
| 42 | .replace(/([A-Z]+)([A-Z][a-z])/g, '$1_$2') |
| 43 | .toLowerCase() |
| 44 | .replace(/_([a-z])/g, (_, letter) => letter.toUpperCase()); |
| 45 | } |
no outgoing calls
no test coverage detected