0.1.0 • Published 8 years ago

writev v0.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

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.