Skip to content
/ cookie-es Public

πŸͺ Cookie and Set-Cookie parser and serializer

License

Notifications You must be signed in to change notification settings

unjs/cookie-es

Folders and files

NameName
Last commit message
Last commit date

Latest commit

06138ce Β· Feb 27, 2025

History

83 Commits
Feb 27, 2025
Oct 4, 2024
Jul 25, 2024
May 3, 2023
May 3, 2023
Feb 27, 2025
Jul 18, 2024
Feb 27, 2025
Feb 27, 2025
Jul 18, 2024
Feb 27, 2025
Feb 27, 2025
May 3, 2023
Jul 18, 2024
Dec 20, 2022

Repository files navigation

πŸͺ cookie-es

npm version npm downloads bundle size install size codecov

ESM ready Cookie and Set-Cookie parser and serializer based on cookie and set-cookie-parser with built-in types.

Usage

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";

License

MIT

Based on jshttp/cookie (Roman Shtylman and hristopher Wilson) and nfriedly/set-cookie-parser (Nathan Friedly).