(name, fallback = null)
| 13 | } |
| 14 | |
| 15 | function arg(name, fallback = null) { |
| 16 | const prefix = `${name}=`; |
| 17 | const inline = process.argv.find((value) => value.startsWith(prefix)); |
| 18 | if (inline) return inline.slice(prefix.length); |
| 19 | const idx = process.argv.indexOf(name); |
| 20 | return idx >= 0 ? process.argv[idx + 1] : fallback; |
| 21 | } |
| 22 | |
| 23 | function q(value) { |
| 24 | const text = String(value); |