hexo/node_modules/JSONStream/bin.js

13 lines
251 B
JavaScript
Raw Normal View History

2023-09-25 15:58:56 +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)
}