0.1.0 • Published 10 years ago

to-string-stream v0.1.0

Weekly downloads
3
License
-
Repository
-
Last release
10 years ago

To String Stream

Tranform a binary stream into strings

NPM

Build Status Dependency Status Code Climate

Installation

npm install -S to-string-stream

Usage

Create an instance of to-string and pipe a readable stream of objects into that instance

var ToStringStream = require('to-string-stream')
// to-string is an instance of require('stream').Transform
var opts = {
  highWaterMark: 2
}
var stringStream = new ToStringStream(opts) // opts is optional

var readStream = {} // a stream of buffer objects
var stringified = readStream.pipe(stringStream)
stringified.on('data', function(chunk) {
  console.dir(chunk) // json string
})
stringified.on('finish', function() {
  console.log('finish event called, all objects stringified')
})
0.1.0

10 years ago

0.0.3

10 years ago