Permalink
Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
20 lines (14 sloc) 336 Bytes

memory-stream

Node.js streams implementation for buffered memory writes.

Usage

var fs = require('fs');
var MemoryStream = require('memory-stream');

var rs = fs.createReadStream('source.txt');
var ws = new MemoryStream();

ws.on('finish', function() {
  console.log(ws.toString());
});

rs.pipe(ws);