pull-pair

pair a source pull-stream and a sink pull-stream

npm install pull-pair
2 downloads in the last week
3 downloads in the last month

pull-pair

simplest duplex pull stream.

A duplex pair of streams {source, sink})

such that a reading everything that the sink reads the source outputs.

var pull = require('pull-stream')
var pair = require('pull-pair')

var p = pair()

pull(pull.values([1, 2, 3]), p.sink)
pull(p.source, pull.collect(function (err, values) {
  if(err) throw err
  console.log(values) //[1, 2, 3]
}))

License

MIT

npm loves you