RFC 6838 Media Type Parser and Formatter
JSON →media-typer is a focused JavaScript utility designed for strictly parsing and formatting media types according to RFC 6838. It enables developers to deconstruct media type strings (e.g., "image/svg+xml") into their `type`, `subtype`, and optional `suffix` components, and conversely, to construct canonical media type strings from these parts. A key differentiator of this package is its explicit design choice to *not* handle media type parameters (such as `charset=utf-8`) or to parse full HTTP `Content-Type` headers, directing users to the `content-type` module for such broader parsing needs. The current stable version is 1.1.0. While releases are infrequent, this indicates a mature, stable, and narrowly scoped utility that receives updates primarily for maintenance or minor feature enhancements like the `test()` function.
Traffic · last 30 days ↑250% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇯🇵 Japan · 🇩🇪 Germany