(args)
| 21160 | } |
| 21161 | |
| 21162 | function parseAllowCommandArgs(args): { option: 1 | 2 | 3 | null; requestIndex: number } { |
| 21163 | const option = normalizeAllowOption(args[0]); |
| 21164 | const parsedIndex = Number.parseInt(String(args[1] ?? ''), 10); |
| 21165 | return { |
| 21166 | option, |
| 21167 | requestIndex: Number.isFinite(parsedIndex) && parsedIndex > 0 ? parsedIndex : 1, |
| 21168 | }; |
| 21169 | } |
| 21170 | |
| 21171 | function normalizeAllowOption(value): 1 | 2 | 3 | null { |
| 21172 | const normalized = String(value ?? '').trim().toLowerCase(); |
no test coverage detected