TTBEGSPVYKGVWXBQFV7UXWP322Y4QRD7DNHIHKPN3M26GERE26BQC
DIV5AAKFVEPSIPP6EMB6IQZBIRTTZM77SFJJCEDYQGGFG4XQEPYAC
const subscribers = new Map()
const subscribers = new Map<string, Set<Callback>>()
subscribers.get(event).set(callback, callback)
subscribers.get(event)?.add(callback)
subscribers.set(event, new Map().set(callback, callback))
subscribers.set(event, new Set<Callback>().add(callback))
subscribers.get(event)?.forEach((cb: Callback) => cb(...data))
if (subscribers.has(event)) { Promise.all([...subscribers.get(event)!].map((cb: Callback) => cb(...data))) }
if (subscribers.has(event)) {
Promise.all([...subscribers.get(event)!].map((cb: Callback) => cb(...data)))
}