Skip to content

Instantly share code, notes, and snippets.

@lloyd
Created February 8, 2012 21:39
Show Gist options
  • Save lloyd/1774098 to your computer and use it in GitHub Desktop.
Save lloyd/1774098 to your computer and use it in GitHub Desktop.
const fs = require('fs');
var s = fs.ReadStream("./dialog.orig.js");
var buf;
s.on('data', function(chunk) {
if (buf) buf += chunk;
else buf = chunk;
});
s.on('end', function() {
console.log(buf);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment