(str: string)
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | export function snakeToCamel(str: string): string { |
| 6 | return str.toLowerCase().replace(/([-_][a-z])/g, group => |
| 7 | group |
| 8 | .toUpperCase() |
| 9 | .replace('-', '') |
| 10 | .replace('_', '')); |
| 11 | } |
| 12 | |
| 13 | export function camelize(obj: any): any { |
| 14 | if (Array.isArray(obj)) { |