RFC 6838 Media Type Parser and Formatter

JSON →
library 1.1.0 ·javascript maintenance
verified May 27, 2026

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.

total hits 16
actors 8 distinct systems
last hit 2d ago AhrefsBot
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇯🇵 Japan · 🇩🇪 Germany