@braze/web-sdk
Version:
Braze SDK for web sites and other JS platforms.
14 lines (13 loc) • 428 B
JavaScript
import r from "../managers/braze-instance.js";
import { logger as E } from "../../shared-lib/index.js";
export function getDeviceId(e) {
if (!r.rr()) return;
const t = r.de();
if (!t) return;
const i = t.fe().id;
if ("function" != typeof e) return i;
E.warn(
"The callback for getDeviceId is deprecated. You can access its return value directly instead (e.g. `const id = braze.getDeviceId()`)",
),
e(i);
}