hexo/node_modules/JSONStream/bin.js

13 lines
263 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
#! /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)
}