Cache Parser
JSON →Cache Parser is a minimal JavaScript/TypeScript library designed specifically for parsing and building the HTTP Cache-Control header. It provides the `parse()` function to convert a raw Cache-Control string into a structured object representing its directives (e.g., `maxAge`, `public`, `noCache`) and the `tokenize()` function to convert a directives object back into an array of tokens suitable for HTTP headers. The current stable version is 1.2.6. It is part of the `tinylibs` monorepo, suggesting a release cadence tied to other utilities within that project, with frequent patch updates as seen in recent changelogs. Its key differentiator lies in its focused, minimal approach to handling only the Cache-Control header, providing clear TSDoc comments for usage and strong type safety for TypeScript users. It targets both Node.js and browser environments, with ESM, CJS, and UMD distributions available.
Traffic · last 30 days ↓14% vs prev 7d
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇷 France