batch-write-stream

Batch Object Write Stream

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
batch-write-stream
100.1.610 years ago10 years agoMinified + gzip package size for batch-write-stream in KB

Readme

batch-write-stream
Build Status

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