Skip to content
Filter an object stream with a callback.
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
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
Something went wrong with that request. Please try again.