Await Event
A really stupid utility I use frequently for event emitters.
Allows you to yield
an event and return the results.
I use this a lot of locking.
Note: you probably shouldn't use this for the error
event.
Example
var PassThrough = PassThrough var stream = // you attach it directly on an event emitterstreamawait = stream
You can use awaitEvent without attach on an event emitter:
var EventEmitter = var emitter =
When use this for error
event, it will reject once error
event emitted:
var EventEmitter = var emitter =