Packages

whatwg-mimetype

5.0.0 · 20 Jan 2026MIT220.3M / weekRepositoryHomepagenpmAtom feed

Your version

2.0.0

major10 Dec 2017Where it was published

2.3.0 is the newest release of 2.x.

Release note

Renamed the package from "content-type-parser" to "whatwg-mimetype", as MIME type is the more general concept, and this is now implementing part of the WHATWG MIME Sniffing Standard.

Replaced the parser and serializer with the newly-specified one from whatwg/mimesniff@cc81ec4.

Overhauled the API to more or less match what is proposed in whatwg/mimesniff#43. Notably, the invariants of the MIME type model are now maintained more aggressively, and the parameters exist on a separate Map-like data structure. Also removed the isText() method, as it's much less interesting than the other two.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.