node package manager
Loosely couple your services. Use Orgs to version and reuse your code. Create a free org »

writev

writev

A concatenating writev function that forwards to _write, for use with Writable streams.

Installation

npm install --save writev

Usage

const writev = require('writev')
const { Writable } = require('streams')
 
const stream = new Writable({
  write (chunk, encoding, cb) {
    // ... 
  }
})
 
stream._writev = writev

API

writev(chunks, cb)

Concatenate all chunks and call this._write with a buffer and the callback cb.