select-stream

Filter an object stream with a callback.

npm install select-stream
1 downloads in the last week
5 downloads in the last month

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
npm loves you