Filter an object stream with a callback.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
README.md
package.json
stream.js

README.md

select-stream

Filter an object stream with a callback.

Build Status

Examples

var SelectStream = require('select-stream');

var sstream = new SelectStream(function(msg) {
  return msg.name === 'foobar';
});

var bad = { name: 'snafu' };
var good = { name: 'foobar' };

sstream.write(bad);
sstream.write(good);

var output = sstream.read();

test.deepEqual(good, output);   // true