co-on
co based event handling.
usage
var co = ;var on = ; ;
var co = ;var on = ;var fs = ; ;
api
var e = on(emitter, [...types]);
- args
- emitter
- EventEmitter instance.
- ...types
- event names.
- emitter
- return
- thunk or co-on object.
yield e.on(...types)
- args
- ...types
- event names.
- see usage.
- event names.
- ...types
- return
- EventEmitter#emit(type,
...
);
- EventEmitter#emit(type,
e.emitted(type)
- args
- type
- event name.
- type
- return
- whether event was already emitted (and buffer is empty).
todo
- error event handling.