mirror of
https://github.com/nodejs/node.git
synced 2025-05-18 13:33:10 +00:00

PR-URL: https://github.com/nodejs/node/pull/19560 Fixes: https://github.com/nodejs/node/issues/19271 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
11 lines
249 B
JavaScript
Executable File
11 lines
249 B
JavaScript
Executable File
#! /usr/bin/env node
|
|
|
|
var JSONStream = require('./')
|
|
|
|
if(!module.parent && process.title !== 'browser') {
|
|
process.stdin
|
|
.pipe(JSONStream.parse(process.argv[2]))
|
|
.pipe(JSONStream.stringify('[', ',\n', ']\n', 2))
|
|
.pipe(process.stdout)
|
|
}
|