Negotiable Paleobotanist Missions

    to-string-stream

    0.1.0 • Public • Published

    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')
    })

    Keywords

    none

    Install

    npm i to-string-stream

    DownloadsWeekly Downloads

    11

    Version

    0.1.0

    License

    ISC

    Last publish

    Collaborators

    • nisaacson