ESM ready Cookie
and Set-Cookie
parser and serializer based on cookie and set-cookie-parser with built-in types.
Install:
# ✨ Auto-detect (npm, yarn, pnpm, bun, deno)
npx nypm install cookie-es
Import:
ESM (Node.js, Bun, Deno)
import {
parse,
serialize,
parseSetCookie,
splitSetCookieString,
} from "cookie-es";
CDN (Deno, Bun and Browsers)
import {
parse,
serialize,
parseSetCookie,
splitSetCookieString,
} from "https://esm.sh/cookie-es";
Based on jshttp/cookie (Roman Shtylman and hristopher Wilson) and nfriedly/set-cookie-parser (Nathan Friedly).