@beamimpact/web-sdk
Version:
The Beam SDK enables brands to connect with their customers over shared values, not transactional discounts, to build stronger loyalty. Our integration achieves this by allowing customers to (a) choose a nonprofit where the brand will donate part of their
3 lines (2 loc) • 567 B
JavaScript
const c=(e=document.cookie)=>e.split(";").reduce((t,n)=>{const o=n.trim(),[i,...s]=o.split("="),l=decodeURIComponent(s.join("="));return t.set(i,l)},new Map),m=e=>c().get(e),p=e=>{const{name:t,value:n,expires:o,...i}=e,s=encodeURIComponent(n),l=`${t}=${s}`,u=o!=null?` ;expires=${new Date(o).toUTCString()}`:"",a=Object.entries(i).map(([d,r])=>r!=null?` ;${d}=${r}`:"").join("");document.cookie=l+a+u},C=e=>p({...e,value:"",expires:-1});export{C as deleteCookieValue,c as getCookieMap,m as getCookieValue,p as setCookieValue};
//# sourceMappingURL=cookies.esm.js.map