Skip to content

Instantly share code, notes, and snippets.

@evilpacket
Created November 11, 2016 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evilpacket/55c16b0e3d9edc0fe1a114cc16c03e68 to your computer and use it in GitHub Desktop.
Save evilpacket/55c16b0e3d9edc0fe1a114cc16c03e68 to your computer and use it in GitHub Desktop.
var fs = require('fs');
var JSONStream = require('jsonstream');
var infile = fs.createReadStream(__dirname + '/' + process.argv[2]);
var stream = JSONStream.parse(['rows', true, 'doc'])
infile.pipe(stream);
stream.on('data', function(data) {
// data is the individual doc for the module. Contains all history, etc.
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment