buffered

Buffered stream

buffered

buffered stream is a implementation of a buffered stream, heavily based on @mikeal's morestreams.

npm install buffered
var fs = require('fs'),
    http = require('http'),
    BufferedStream = require('buffered').BufferedStream;
 
http.createServer(function (reqres) {
  var buffer = new BufferedStream();
  req.pipe(buffer);
  setTimeout(function () {
    buffer.pipe(fs.createWriteStream('req'));
  }, 500);
}).listen(8000);