react-box-tools
Version:
Box tools react components, utils and hooks
2 lines (1 loc) • 423 B
JavaScript
const s=typeof window<"u",o=typeof window>"u";var e;const r=s&&typeof((e=window==null?void 0:window.document)==null?void 0:e.documentElement)<"u",t=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:");exports.csr=s;exports.isDOM=r;exports.parseJSON=t;exports.quotelessJSON=c;exports.ssr=o;
;