accumulate
v0.0.2
Published
Accumualates data, e.g. from a readable stream
Downloads
5
Readme
Accumulate
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')()
stream.on('data', accumulate)
stream.on('end', function() {
var data = accumulate().data
})