UNPKG

react-box-tools

Version:

Box tools react components, utils and hooks

18 lines (17 loc) 474 B
const s = typeof window < "u", t = typeof window > "u"; var e; const r = s && typeof ((e = window == null ? void 0 : window.document) == null ? void 0 : e.documentElement) < "u", d = (n) => { try { return n === "undefined" ? void 0 : JSON.parse(n ?? ""); } catch { console.warn("Parsing error on", { value: n }); return; } }, c = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:"); export { s as c, r as i, d as p, c as q, t as s };