(i)
| 667 | this._socket.send(JSON.stringify({ action: "subscribe", name: i })); |
| 668 | } |
| 669 | detach(i) { |
| 670 | if (!i) { |
| 671 | if (this._mode == 3) |
| 672 | for (const a in this._events) |
| 673 | this._socket.send(JSON.stringify({ action: "unsubscribe", key: a })); |
| 674 | return void (this._events = {}); |
| 675 | } |
| 676 | const { id: t, name: n } = i, s = this._events[n]; |
| 677 | if (s) { |
| 678 | const a = s.filter((o) => o.id != t); |
| 679 | a.length ? this._events[n] = a : (delete this._events[n], this._mode == 3 && this._socket.send(JSON.stringify({ action: "unsubscribe", name: n }))); |
| 680 | } |
| 681 | } |
| 682 | fire(i, t) { |
| 683 | const n = this._events[i]; |
| 684 | if (n) |
no outgoing calls
no test coverage detected