Send to zulip

This commit is contained in:
Koper
2023-11-20 21:39:33 +07:00
parent 82f50817f8
commit ba40d28152
3609 changed files with 2311843 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env node
jmespath = require('./jmespath');
process.stdin.setEncoding('utf-8');
if (process.argv.length < 2) {
console.log("Must provide a jmespath expression.");
process.exit(1);
}
var inputJSON = "";
process.stdin.on('readable', function() {
var chunk = process.stdin.read();
if (chunk !== null) {
inputJSON += chunk;
}
});
process.stdin.on('end', function() {
var parsedInput = JSON.parse(inputJSON);
console.log(JSON.stringify(jmespath.search(parsedInput, process.argv[2])));
});