@braze/web-sdk
Version:
Braze SDK for web sites and other JS platforms.
29 lines (28 loc) • 522 B
JavaScript
import { Guid as O } from "../../shared-lib/index.js";
export default class u {
constructor() {
this.Mi = {};
}
Dt(t) {
if ("function" != typeof t) return null;
const i = O.ce();
return (this.Mi[i] = t), i;
}
removeSubscription(t) {
delete this.Mi[t];
}
removeAllSubscriptions() {
this.Mi = {};
}
ic() {
return Object.keys(this.Mi).length;
}
X(t) {
const i = [];
for (const s in this.Mi) {
const r = this.Mi[s];
i.push(r(t));
}
return i;
}
}