Fast Content-Type Header Parser
JSON →fast-content-type-parse is a lightweight and performant utility designed to parse HTTP `Content-Type` headers in strict accordance with RFC 7231. Developed under the Fastify ecosystem, it aims for speed, outperforming Node.js's native `util#MIMEType` and other popular packages like `content-type`. The current stable version is `3.0.0`, with a release cadence that includes major updates for environmental compatibility and minor releases for maintenance. It provides both a strict parsing method that throws errors on invalid input and a 'safe' alternative that returns a default empty object for malformed headers. The package ships with TypeScript type definitions, ensuring robust development in TypeScript projects.
Traffic · last 30 days ↓50% vs prev 7d
top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany