Implements Event Emitter (PubSub, Observable) pattern.
- Asynchronous listeners call
- Can set onetime events
- Class based to create independent emitters
- No dependencies
- An event should be of
Symbol
type
// Example of organizing and using Symbol events
// ee-types.js
export const MY_EVENT = Symbol('optional description')
// index.js
import { MY_EVENT } from './ee-types.js'
const ee = new Lidire()
ee.listen(MY_EVENT, listenerFn)
// ...
ee.dispatch(MY_EVENT, data)