(name, fallback = null)
| 9 | } = require('../core/codex/native-integrations'); |
| 10 | |
| 11 | function arg(name, fallback = null) { |
| 12 | const prefix = `${name}=`; |
| 13 | const inline = process.argv.find((value) => value.startsWith(prefix)); |
| 14 | if (inline) return inline.slice(prefix.length); |
| 15 | const idx = process.argv.indexOf(name); |
| 16 | return idx >= 0 ? process.argv[idx + 1] : fallback; |
| 17 | } |
| 18 | |
| 19 | function readStdin() { |
| 20 | try { |
no outgoing calls
no test coverage detected