@prostory/mountain
Version:
Yet another HTTP/2 server and client.
3 lines (2 loc) • 448 B
JavaScript
const e={Path:"/",Secure:!0,HttpOnly:!0,SameSite:"Strict"},o=e=>e.split("; ").reduce(((e,o)=>{const[n,t]=o.split("=");return e[decodeURIComponent(n)]=void 0===t||decodeURIComponent(t),e}),{}),n=(o,n,t={})=>Object.entries({...e,...t}).reduce(((e,[o,n])=>`${e}; ${encodeURIComponent(o)}${!0===n?"":`=${encodeURIComponent(n)}`}`),`${encodeURIComponent(o)}=${encodeURIComponent(n)}`);export{n as create,o as parse};
//# sourceMappingURL=cookies.js.map