# florian/cookie.js

A tiny JavaScript library that simplifies cookies.

Repository: https://github.com/florian/cookie.js
Canonical: https://ross.abutalabs.com/products/cookiejs
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2024-06-03T21:19:52+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5277, "days_push": 821, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1128, forks 179 (observed 2026-08-28T04:03:41.897707+00:00)

## What it is
cookie.js is a tiny, dependency-free JavaScript library that simplifies working with browser cookies, wrapping the awkward document.cookie API. It supports setting, getting, and removing cookies with options like expiry, domain, path, secure, and SameSite, plus chaining and batch operations.

## Use cases
- set and get cookies in the browser without dealing with document.cookie
- set multiple cookies at once with expiry options
- manage cookie attributes like domain, path, secure, and SameSite
- remove cookies from JavaScript
- use a lightweight cookie helper in AMD or CommonJS projects

## When to choose
- you need a minimal (<1 KB gzipped) cookie utility with no dependencies
- you want a simple, chainable API over document.cookie
- you need UMD support for AMD/CommonJS/browser global usage

## When to avoid
- you need server-side cookie handling in Node.js
- you already use a framework or library with built-in cookie utilities
- you need localStorage/sessionStorage instead of cookies

## Facets
- artifact type: library
- maturity: maintenance
- function: serialization, developer-tools
- domain: web-development, frontend
- platform: browser
- tags: cookies, browser-storage, zero-dependency, umd, nodejs

## Member repositories
- florian/cookie.js (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:41.897707+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:38:33.171793+00:00, confidence not recorded.
  - readme: https://github.com/florian/cookie.js (fetched 2026-08-28T04:03:41.897707+00:00, sha 069ba0cc9181)
- Data as of 2026-08-30T08:39:29.467469+00:00.
