(argv, name, fallback)
| 8 | const ROUTER_HERO_PREFIX = /\{ text: "[^"\n]*", style: \{ fg: palette\.accent, bold: true \} \},/g; |
| 9 | |
| 10 | export function readArg(argv, name, fallback) { |
| 11 | const idx = argv.indexOf(name); |
| 12 | if (idx === -1) return fallback; |
| 13 | const value = argv[idx + 1]; |
| 14 | if (!value || value.startsWith("--")) return fallback; |
| 15 | return value; |
| 16 | } |
| 17 | |
| 18 | export function parsePositiveInt(rawValue, label) { |
| 19 | const parsed = Number(rawValue); |
no outgoing calls
no test coverage detected