Skip to content

Instantly share code, notes, and snippets.

@mikeal
Created April 27, 2013 00:04
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 mikeal/5471250 to your computer and use it in GitHub Desktop.
Save mikeal/5471250 to your computer and use it in GitHub Desktop.
var j = JSONStream.parse('rows.*.doc')
j._write = j.write
response.pause = function () {}
j.write = function (chunk) {j._write(chunk); return true;}
response.on('data', j.write.bind(j))
// response.pipe(j)
j.on('data', console.log.bind(console))
response.on('end', console.log.bind(console, 'end'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment