16 lines
1.8 KiB
JavaScript
16 lines
1.8 KiB
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
class BrowserConnectionTracker {
|
|
constructor() {
|
|
this.activeBrowserConnections = {};
|
|
}
|
|
add(connection) {
|
|
this.activeBrowserConnections[connection.id] = connection;
|
|
}
|
|
remove(connection) {
|
|
delete this.activeBrowserConnections[connection.id];
|
|
}
|
|
}
|
|
exports.default = new BrowserConnectionTracker();
|
|
module.exports = exports.default;
|
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHJhY2tlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9icm93c2VyL2Nvbm5lY3Rpb24vdHJhY2tlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBLE1BQU0sd0JBQXdCO0lBRzFCO1FBQ0ksSUFBSSxDQUFDLHdCQUF3QixHQUFHLEVBQUUsQ0FBQztJQUN2QyxDQUFDO0lBRU0sR0FBRyxDQUFFLFVBQTZCO1FBQ3JDLElBQUksQ0FBQyx3QkFBd0IsQ0FBQyxVQUFVLENBQUMsRUFBRSxDQUFDLEdBQUcsVUFBVSxDQUFDO0lBQzlELENBQUM7SUFFTSxNQUFNLENBQUUsVUFBNkI7UUFDeEMsT0FBTyxJQUFJLENBQUMsd0JBQXdCLENBQUMsVUFBVSxDQUFDLEVBQUUsQ0FBQyxDQUFDO0lBQ3hELENBQUM7Q0FDSjtBQUVELGtCQUFlLElBQUksd0JBQXdCLEVBQUUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBCcm93c2VyQ29ubmVjdGlvbiBmcm9tICcuL2luZGV4JztcblxuY2xhc3MgQnJvd3NlckNvbm5lY3Rpb25UcmFja2VyIHtcbiAgICBwdWJsaWMgYWN0aXZlQnJvd3NlckNvbm5lY3Rpb25zOiB7IFtpZDogc3RyaW5nXTogQnJvd3N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