Skip to content

Instantly share code, notes, and snippets.

@ajcrites
Last active March 10, 2016 19:53
Show Gist options
  • Save ajcrites/96ce04dabc03dc796086 to your computer and use it in GitHub Desktop.
Save ajcrites/96ce04dabc03dc796086 to your computer and use it in GitHub Desktop.
const fs = require("fs");
const JSONStream = require("JSONStream");
const parser = JSONStream.parse('*');
const stream = fs.createReadStream("./bl");
stream.pipe(parser);
parser.on("data", data => {
let len = Buffer.byteLength(data.result);
if (len > 500000) {
console.log(data.url);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment