Accumualates data, e.g. from a readable stream

npm install accumulate
5 downloads in the last week
12 downloads in the last month


npm install accumulate

Accumulates data, e.g. from a readable stream.

No more of this

var data = ''
stream.on('data', function(d) {
    data += d
stream.on('end', function() {
    /* something with `data` */

More of this

var accumulate = require('accumulate')('utf8')
stream.on('data', accumulate)
stream.on('end', accumulate.done(console.log))
npm loves you