File: bin.js

package info (click to toggle)
node-jsonstream 1.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 600 kB
  • sloc: makefile: 16; sh: 14
file content (12 lines) | stat: -rw-r--r-- 251 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#! /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)
}