Miss any of our Open RFC calls?Watch the recordings here! »

seneca-act-stream

0.0.3 • Public • Published

SenecaActStream

Acting on Seneca through a Stream2 interface.

var seneca    = require('seneca')()
  , actStream = require('./')
  , pattern = { sample: 'call' }
  , stream  = actStream(seneca, pattern)
  , message = { hello: 'world' }
 
function check(arrived, done) {
  console.log('message received', arrived)
  done(null)
}
 
seneca.add(pattern, check);
 
stream.on('one', function() {
  console.log('one event')
})
 
stream.end(message);

Acknowledgements

This project was kindly sponsored by nearForm.

License

MIT

Keywords

none

Install

npm i seneca-act-stream

DownloadsWeekly Downloads

153

Version

0.0.3

License

MIT

Last publish

Collaborators

  • avatar
  • avatar