2023-06-10 20:49:00 +00:00
|
|
|
#!/usr/bin/env node
|
2023-06-10 20:32:41 +00:00
|
|
|
/* eslint-env node */
|
|
|
|
|
|
|
|
import fs from 'fs';
|
|
|
|
|
|
|
|
const data = JSON.parse(fs.readFileSync(0, 'utf-8').trim());
|
|
|
|
|
|
|
|
let value = data;
|
|
|
|
for (let i = 2; i < process.argv.length; i++) {
|
|
|
|
value = value[process.argv[i]] ?? null;
|
|
|
|
}
|
|
|
|
process.stdout.write(String(value), 'utf-8');
|