Open pkoppstein opened 6 years ago
A simple way to support reading from STDIN would be to replace the "var contents" line in rjson.js by:
const fd = (program.args[0] === "-") ? process.stdin.fd : program.args[0]; var contents = fs.readFileSync(fd).toString();
This allows "-" to be specified on the command-line.
A simple way to support reading from STDIN would be to replace the "var contents" line in rjson.js by:
This allows "-" to be specified on the command-line.