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

Readme

Keywords

none

Package Sidebar

Install

npm i seneca-act-stream

Weekly Downloads

15

Version

0.0.3

License

MIT

Last publish

Collaborators

  • matteo.collina
  • wyatt