accumulate

Accumualates data, e.g. from a readable stream

Accumulate

npm install accumulate

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

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