mirror of
https://git.unlock-music.dev/um/um-react.git
synced 2024-11-24 00:02:16 +00:00
13 lines
279 B
JavaScript
13 lines
279 B
JavaScript
|
#!/bin/env node
|
||
|
/* 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');
|