You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
410 B

const s=(o,n,i)=>{const t=new Date;t.setTime(t.getTime()+i*24*60*60*1e3);const e="expires="+t.toUTCString();document.cookie=o+"="+n+"; "+e},c=o=>{const n=o+"=",i=document.cookie.split(";");for(let t=0;t<i.length;t++){let e=i[t];for(;e.charAt(0)==" ";)e=e.substring(1);if(e.indexOf(n)!=-1)return e.substring(n.length,e.length)}return""},r=o=>{s(o,"",-1)};export{r as clearCookie,c as getCookie,s as setCookie};