mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 20:59:05 +00:00
Send to zulip
This commit is contained in:
23
aws/lambda-nodejs18.x/UpdateZulipStreams/node_modules/jmespath/jp.js
generated
vendored
Executable file
23
aws/lambda-nodejs18.x/UpdateZulipStreams/node_modules/jmespath/jp.js
generated
vendored
Executable 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])));
|
||||
});
|
||||
Reference in New Issue
Block a user