UNPKG

@braze/web-sdk

Version:

Braze SDK for web sites and other JS platforms.

19 lines (18 loc) 589 B
import r from "../managers/braze-instance.js"; import { keys as C } from "../util/code-utils.js"; import { logger as N, IndexedDBAdapter as st } from "../../shared-lib/index.js"; import { BRAZE_MUST_BE_INITIALIZED_ERROR as p } from "../common/constants.js"; export function wipeData() { const o = r.j(); if (null == o) return void N.warn(p); o.clearData(); const t = C(st.Ls); for (let o = 0; o < t.length; o++) { const n = t[o], r = st.Ls[n]; new st(r, N).clearData(); } if (r.rr()) for (const o of r.ar()) o.clearData(!0); const n = r.g(); n && n.fo(); }