safe-event-emitter
An EventEmitter
that isolates the emitter from errors in handlers. If an error is thrown in a handler it is caught and re-thrown inside of a setTimeout
so as to not interupt the emitter's code flow.
API is the same as EventEmitter
.
usage
const SafeEventEmitter = const ee = eeee // no error here // error is thrown after setTimeout