A readable stream that accepts multiple sources.

Multisource Stream

A readable stream that accepts an arbitrary number of sources, which can start from any offset.

var multi = new Multisource()
var source1 = multi.from(0)
var source2 = multi.from(6)
source2.write("World !") // => null
source1.write("Hello ") // => "Hello World !"
var multi = new Multisource()
multi.from(3).write("bar") // => "foobar"

Class: Multisource

  • offset {Number}
  • options {Object} Directly passed to the Source constructor
  • return {Source} A stream.Duplex which writes to the multisource stream from an offset