Combine a bunch of streams into one.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
LICENSE.txt
README.md
index.js
package.json

README.md

Demux

Combine a bunch of streams into one.

var crdt  = require('crdt');
var demux = require('demux');

var doc1 = new crdt.Doc;
var doc2 = new crdt.Doc;
var doc3 = new crdt.Doc;

demux(doc1.createReadStream(), doc2.createReadStream()).pipe(doc3.createWriteStream());

// Now doc1 and doc2 replicate to doc3, basiclly a master, master, slave scenario

Demux

demux(stream...)

Create one stream that all the other streams go into.