cmd.js 304 B

12345678910
  1. #!/usr/bin/env node
  2. var argv = require('subarg')(process.argv.slice(2));
  3. var JSONStream = require('JSONStream');
  4. var sort = require('../')(argv);
  5. var parse = JSONStream.parse([ true ]);
  6. var stringify = JSONStream.stringify();
  7. process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout);