(raw: unknown)
| 418 | }); |
| 419 | |
| 420 | function parseIntFlag(raw: unknown): number | undefined { |
| 421 | if (raw === undefined || raw === null || raw === "") return undefined; |
| 422 | const n = Number.parseInt(String(raw), 10); |
| 423 | return Number.isFinite(n) ? n : undefined; |
| 424 | } |
| 425 | |
| 426 | /** |
| 427 | * Parse a flag that must be a positive integer (>= 1) when supplied. |
no outgoing calls
no test coverage detected