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