Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
An easier way to deal with scuttlebutt streams.
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
.gitignore
LICENSE.txt
README.md
index.js
package.json
test.js

README.md

Scuttlebutt Stream

An easier way to deal with scuttlebutt streams.

var scuttlebutt = require('scuttlebutt-stream');
var Model       = require('scuttlebutt/model');

var m1 = new Model();
var s1 = m1.createStream();

var m2 = new Model();
var s2 = m2.createStream();

var scs = scuttlebutt(function(data) {
    this.queue([ data[0], 'Foo' ]);
});

s1.pipe(scs).pipe(s2);

m1.set('name', 'Drew');

process.nextTick(function() {
    console.log(m1.get('name'), m2.get('name'));
});
Something went wrong with that request. Please try again.