Remove all handlers for all event types.
Emit an event to all subscribers.
Event type
Event payload
The agent or environment emitting the event
Get the number of handlers for an event type.
Event type to check
Check if there are any handlers for an event type.
Event type to check
Remove all handlers for a specific event type.
Event type to clear handlers for
Subscribe to an event type.
Event type to listen for
Function to call when event is emitted
Unsubscribe function
Subscribe to an event type, but only fire once.
Event type to listen for
Function to call when event is emitted
Unsubscribe function (can cancel before event fires)
A publish-subscribe event bus for agent and environment events.
Example
Since
0.6.0