summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/JSONStream/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/JSONStream/index.js')
-rwxr-xr-xdeps/npm/node_modules/JSONStream/index.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/deps/npm/node_modules/JSONStream/index.js b/deps/npm/node_modules/JSONStream/index.js
index 4e3b0ef678..2cc9fff071 100755
--- a/deps/npm/node_modules/JSONStream/index.js
+++ b/deps/npm/node_modules/JSONStream/index.js
@@ -1,3 +1,5 @@
+#! /usr/bin/env node
+
'use strict'
var Parser = require('jsonparse')
@@ -242,3 +244,9 @@ exports.stringifyObject = function (op, sep, cl, indent) {
return stream
}
+if(!module.parent && process.title !== 'browser') {
+ process.stdin
+ .pipe(exports.parse(process.argv[2]))
+ .pipe(exports.stringify('[', ',\n', ']\n', 2))
+ .pipe(process.stdout)
+}