(args: { handoff: string; key: string })
| 129 | } |
| 130 | |
| 131 | function readKeyValue(args: { handoff: string; key: string }): string | null { |
| 132 | const re = new RegExp(`^${args.key}\\s*:\\s*([^\\r\\n]+)`, "im"); |
| 133 | const match = re.exec(args.handoff); |
| 134 | if (!match) return null; |
| 135 | const raw = match[1].trim(); |
| 136 | if (raw.length === 0) return null; |
| 137 | return raw.replace(/^`([^`]+)`$/, "$1").trim(); |
| 138 | } |
| 139 | |
| 140 | function normalizeEnumValue(raw: string): string { |
| 141 | return raw.toLowerCase().replace(/[\s_]+/g, "-"); |
no outgoing calls
no test coverage detected