Introducing npm Enterprise add-ons. Integrate third-party dev tools into npm…
Combine a bunch of streams into one
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
Create one stream that all the other streams go into.
What happens when npm’s amazing community gets together to share with one another? Buy a ticket »
how? learn more