/bufferstream

A duplex stream that reads from and writes to a Node.js Buffer object

Primary LanguageJavaScriptISC LicenseISC

Installation

$ npm i node-bufferstream
node-bufferstream@0.1.0 node_modules/node-bufferstream
$ 

Example

import BufferStream from 'node-bufferstream'

const stream = new BufferStream('Hello')

stream.write(', world!')

stream.on('data', chunk => {
  process.stdout.write(chunk)
})

stream.on('end', () => {
  process.stdout.write('\n')
})