(name: string)
| 164 | } |
| 165 | |
| 166 | function splitGoIdentifierWords(name: string): string[] { |
| 167 | return name |
| 168 | .replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2") |
| 169 | .replace(/([a-z0-9])([A-Z])/g, "$1_$2") |
| 170 | .split(/[^A-Za-z0-9]+/) |
| 171 | .filter((word) => word.length > 0); |
| 172 | } |
| 173 | |
| 174 | function isStringEnumDefinition(definition: JSONSchema7): definition is JSONSchema7 & { enum: string[] } { |
| 175 | return Array.isArray(definition.enum) && definition.enum.every((value) => typeof value === "string"); |
no outgoing calls
no test coverage detected
searching dependent graphs…