Adds a handler. You get back an id which can be used to remove the handler later.
Handlers can be added with 'once' flag set to true. This will automatically remove them after the first value is sent to them.
If handler returns true, subsequent handlers are not invoked.
Remove all handlers
Returns true if list is empty
Emit a value to all handlers Returns true if at least one handler reported 'true' as a response. Also returns true
Remove a handler by its id.
True if handler was removed, false if not found.
Maintains a list of listeners to receive data.
Type parameter is the type of events sent.
If event handler returns true, additional handlers are not called.