(aliases: string[] = [], name: string)
| 21 | } |
| 22 | |
| 23 | function normalizeAliases(aliases: string[] = [], name: string): string[] { |
| 24 | const normalized = new Set<string>(); |
| 25 | for (const alias of aliases) { |
| 26 | const key = normalizeModeKey(alias); |
| 27 | if (!key || key === name) continue; |
| 28 | normalized.add(key); |
| 29 | } |
| 30 | return [...normalized]; |
| 31 | } |
| 32 | |
| 33 | function escapeRegExp(value: string): string { |
| 34 | return String(value ?? "").replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); |
no test coverage detected