(t2)
| 1233 | this._socket.send(JSON.stringify({ action: "subscribe", name: t2 })); |
| 1234 | } |
| 1235 | detach(t2) { |
| 1236 | if (!t2) { |
| 1237 | if (3 == this._mode) |
| 1238 | for (const t3 in this._events) |
| 1239 | this._socket.send(JSON.stringify({ action: "unsubscribe", key: t3 })); |
| 1240 | return void (this._events = {}); |
| 1241 | } |
| 1242 | const { id: e, name: s } = t2, i = this._events[s]; |
| 1243 | if (i) { |
| 1244 | const t3 = i.filter((t4) => t4.id != e); |
| 1245 | t3.length ? this._events[s] = t3 : (delete this._events[s], 3 == this._mode && this._socket.send(JSON.stringify({ action: "unsubscribe", name: s }))); |
| 1246 | } |
| 1247 | } |
| 1248 | fire(t2, e) { |
| 1249 | const s = this._events[t2]; |
| 1250 | if (s) |
no outgoing calls
no test coverage detected