UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

17 lines (16 loc) 568 B
import r, { OPTIONS as U } from "../managers/braze-instance.js"; import { logger as b, 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._s.Xs; new et(o, b).setItem(o.Ws.pe, o.be, !0), b.info("disableSDK was called"), r.destroy(!1), r.fe(!0); }