dat-stream-replicator
Streaming replicator for dat-graph
npm install dat-stream-replicator

Usage
var replicator = require('dat-stream-replicator')
var dat = datGraphInstance
var otherDat = anotherDatGraphInstance
var stream = replicator(dat)
var otherStream = replicator(otherDat)
stream.pipe(otherStream).pipe(stream)
API
var stream = replicator(datGraph, [options])
Create a new replication stream for a dat-graph instance.
Options include:
{
gzip: true,
mode: 'sync'
}
var stream = replicator.pull(datGraph, [options])
Shorthand for {mode: 'pull'}
var stream = replicator.push(datGraph, [options])
Shorthand for {mode: 'push'}
Progress monitoring
The stream will emit progress events when pushing / pulling. The events look like this
stream.on('push', function (event) {
})
stream.on('pull', function (event) {
})
You can always access the latest pushed/pulled event as stream.pushed and stream.pulled.
License
MIT