bin.js 251 B

123456789101112
  1. #! /usr/bin/env node
  2. var JSONStream = require('./')
  3. if(!module.parent && process.title !== 'browser') {
  4. process.stdin
  5. .pipe(JSONStream.parse(process.argv[2]))
  6. .pipe(JSONStream.stringify('[', ',\n', ']\n', 2))
  7. .pipe(process.stdout)
  8. }