UNPKG

@omnimedia/omnitool

Version:

open source video processing tools

14 lines 312 B
export class Machina { count = 0; #handlers = new Map(); register(id, handler) { this.#handlers.set(id, handler); } unregister(id) { this.#handlers.delete(id); } dispatch(id, event) { this.#handlers.get(id)?.(event); } } //# sourceMappingURL=machina.js.map