This package parses, serializes, manipulates, and sniffs MIME types according to the WHATWG MIME Sniffing Standard. It provides a `MIMEType` API for working with MIME type strings and parameters, and a `computedMIMEType()` function that determines the computed MIME type of a resource by applying the full browser-compatible sniffing algorithm to resource bytes (and optional `Content-Type` and sniffing-related options).
Project status
- Actively maintained: The most recent upstream push and update is v5.0.0 on 2026-01-20/2026-01-21, indicating ongoing maintenance rather than a stalled project.
- Apparent update cadence: Major
updatesappear roughly every 2 to 3 years based on the provided history (v3 in 2021, v4 in 2023, v5 in early 2026).
AI summary generated Today
Recent updates
v5.0.0
4 months agoVersion 5.0.0 raises the minimum supported Node.js version to 20 and changes the public export shape so `MIMEType` is no longer the default export. It also adds MIME sniffing support via a new `computedMIMEType` export, and removes the prior raw parsing/serialization APIs.
BreakingFeaturesv4.0.0
11/11/2023Release v4.0.0 primarily raises the minimum supported Node.js version to 18. The code diff also shows a broader toolchain migration for contributors and CI, including moving from Yarn and Jest to npm, node:test, and c8 for coverage. There is no evidence in the provided diff of changes to the published MIME type parsing APIs themselves.
Breakingv3.0.0
9/18/2021v3.0.0 raises the minimum supported Node.js version to v12 and updates how MIMEType.isJavaScript() treats parameters. The release notes document a switch to allowing parameters by default, with a new option to prohibit parameters.
Breakingv2.3.0
11/20/2018Release v2.3.0 updates MIME type parsing to follow the WHATWG change from ASCII whitespace handling to HTTP whitespace handling. In particular, U+000C (FF) is no longer treated as special whitespace during parsing, aligning behavior with the WHATWG mimesniff spec update.
v2.2.0
9/14/2018Release v2.2.0 updates the MIME type parsing behavior to allow empty string parameter values, as described in the release notes. The code changes show this is implemented across parsing, validation helpers, and serialization logic to handle zero-length quoted-string values correctly.
Featuresv2.1.0
2/4/2018v2.1.0 adds a new `MIMEType.parse(string)` static factory for parsing untrusted input without throwing on parse failure. It also introduces `mimeType.isJavaScript({ allowParameters })` to detect JavaScript MIME types, with optional tolerance for parameters.
Featuresv2.0.1
12/10/2017Release v2.0.1 appears to be a documentation-only release that updates references in README examples and bumps the package version metadata. The code diff shows no application/runtime logic changes, only README text changes and package/package-lock version updates.
v2.0.0
12/10/2017This release replaces the old Content-Type parser/serializer with a new WHATWG MIME Sniffing Standard-based implementation and overhauls the public API. The package is effectively a new module, exposing a MIMEType class with Map-like parameter handling, rather than the previous parseContentType function and parameterList array.
BreakingFeaturesv1.0.2
10/23/2017Release v1.0.2 updates the project licensing from WTFPL to MIT. The code changes are limited to documentation and package metadata, with no functional implementation changes shown in the diff.
Breakingv1.0.1
10/15/2016This release primarily removes an accidentally included file, lib/test.js. The only other change is a version bump in package.json from 1.0.0 to 1.0.1.