batch-write-stream
v0.1.6
Published
Batch Object Write Stream
Downloads
193
Readme
batch-write-stream
Install
$ npm install batch-write-stream --save
Use
Require
var BatchWriteStream = require('batch-write-stream');
Create
var stream = BatchWriteStream();
Or, with options:
var options = {
highWaterMark: 100, // default
maxConcurrentBatches: 1 // default
};
var stream = BatchWriteStream(options);
Implement _writeBatch
stream._writeBatch = function(batch, cb) {
// batch is an array
// call cb when done
}
License
MIT