A sse stream based on events. Wrap an emitter
with this module to emit sse events.
$ npm install co-sse-events
Returns events in sequence based on the sse spec
var emitter = new Emitter;
var e;
while (e = yield sse(emitter)) {
console.log(e.out)
/* ->
* event: test
* data: { some: prop }
*
* ->
* event: test
* data: 'prop'
*/
}
emitter
.emit('test', { some: prop })
.emit('test', 'prop')