You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
typesetting/pitfall/pdfkit/node_modules/stream-combiner
Matthew Butterick 3f36e2ce2c porting 7 years ago
..
test porting 7 years ago
.npmignore porting 7 years ago
.travis.yml porting 7 years ago
LICENSE porting 7 years ago
README.md porting 7 years ago
index.js porting 7 years ago
package.json porting 7 years ago

README.md

stream-combiner

<img src=https://secure.travis-ci.org/dominictarr/stream-combiner.png?branch=master>

Combine (stream1,...,streamN)

Turn a pipeline into a single stream. pipeline returns a stream that writes to the first stream and reads from the last stream.

Listening for 'error' will recieve errors from all streams inside the pipe.

  var Combine = require('stream-combiner')
  var es      = require('event-stream')

  Combine(                         //connect streams together with `pipe`
    process.openStdin(),              //open stdin
    es.split(),                       //split stream to break on newlines
    es.map(function (data, callback) {//turn this async function into a stream
      callback(null
        , inspect(JSON.parse(data)))  //render it nicely
    }),
    process.stdout                    // pipe it to stdout !
    )

License

MIT