(s: string)
| 126 | } |
| 127 | |
| 128 | function toSnakeCase(s: string): string { |
| 129 | return s |
| 130 | .replace(/([A-Z])/g, "_$1") |
| 131 | .replace(/^_/, "") |
| 132 | .replace(/[.\-\s]+/g, "_") |
| 133 | .toLowerCase() |
| 134 | .replace(/_+/g, "_"); |
| 135 | } |
| 136 | |
| 137 | /** Convert a JSON property name (camelCase) to a Rust field name (snake_case). */ |
| 138 | function toRustFieldName(jsonName: string): string { |
no outgoing calls
no test coverage detected
searching dependent graphs…