bulk-write-stream

2.0.1 • Public • Published

bulk-write-stream

Writable stream that forwards everything in the highWaterMark buffer to a custom write function using the new writev api in streams

npm install bulk-write-stream

build status

Usage

var bulk = require('bulk-write-stream')
 
var ws = bulk.obj(function (list, cb) {
  console.log('should write list of objects', list)
  cb()
})
 
ws.write('a')
ws.write('b')
ws.write('c')
ws.write('d')

API

var ws = bulk([options], write, [flush])

Create a new binary bulk write stream. Options are forwarded to the writable stream constructor. Write is called with write(list, cb) where list is everything currently buffered in the writable stream.

If you specify a flush function that will be called with flush(cb) before the stream emits finish.

var ws = bulk.obj([options], write, [flush])

A shorthand for setting objectMode: true

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i bulk-write-stream

Weekly Downloads

7,510

Version

2.0.1

License

MIT

Unpacked Size

6.72 kB

Total Files

6

Last publish

Collaborators

  • mafintosh