@braze/web-sdk
Version:
Braze SDK for web sites and other JS platforms.
17 lines (16 loc) • 568 B
JavaScript
import r, { OPTIONS as U } from "../managers/braze-instance.js";
import { logger as E, IndexedDBAdapter as et } from "../../shared-lib/index.js";
import ne, { STORAGE_KEYS as s } from "../managers/storage-manager.js";
export function disableSDK() {
const e = r.nn();
e && e.requestImmediateDataFlush();
const n = r.er(U.se),
a = new ne.le(null, !0, n),
i = "This-cookie-will-expire-in-" + a.me();
a.store(s.ce, i);
const o = et.Ps.$s;
new et(o, E).setItem(o.Os.pe, o.be, !0),
E.info("disableSDK was called"),
r.destroy(!1),
r.fe(!0);
}