
Product
Introducing Custom Tabs for Org Alerts
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.
dat-stream-replicator
Advanced tools
Streaming replicator for dat-graph
npm install dat-stream-replicator
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)
var stream = replicator(datGraph, [options])Create a new replication stream for a dat-graph instance. Options include:
{
// gzip the nodes being sent. both sides have to say `true` for gzip to be enabled
// defaults to true
gzip: true,
// only pull/push or do a two way sync. defaults to sync
mode: 'sync'
}
var stream = replicator.pull(datGraph, [options])Shorthand for {mode: 'pull'}
var stream = replicator.push(datGraph, [options])Shorthand for {mode: 'push'}
The stream will emit progress events when pushing / pulling. The events look like this
stream.on('push', function (event) {
/*
{
transferred: nodesPushedSofar,
length: nodesToBePushedInTotals
}
*/
})
stream.on('pull', function (event) {
/*
{
transferred: nodesPulledSofar,
length: nodesToBePulledInTotals
}
*/
})
You can always access the latest pushed/pulled event as stream.pushed and stream.pulled.
MIT
FAQs
Streaming replicator for dat-graph
The npm package dat-stream-replicator receives a total of 1 weekly downloads. As such, dat-stream-replicator popularity was classified as not popular.
We found that dat-stream-replicator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Create and share saved alert views with custom tabs on the org alerts page, making it easier for teams to return to consistent, named filter sets.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.