</>PackageGraphPackageGraph

whatwg-mimetype

npmv5.0.0

Parses, serializes, and manipulates MIME types, according to the WHATWG MIME Sniffing Standard

Safe to adopt

Yes — whatwg-mimetype scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 233 days ago.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • BMaintenance: grade B, Good.

    Last published 233 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 42 KB installed.

  • ASupply chain: grade A, Excellent.

    No install scripts, 6 maintainers, and a contained dependency surface.

  • ALicense: grade A, Excellent.

    MIT — permissive, with no copyleft found in the dependency tree.

Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.

Install cost

What you actually take on by adding whatwg-mimetype to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

42 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
node >=20
Module format
CommonJS only
TypeScript
No bundled types
Install scripts
None

Quick start

A usage example from the whatwg-mimetype README.

const { MIMEType } = require("whatwg-mimetype");

const mimeType = new MIMEType(`Text/HTML;Charset="utf-8"`);

console.assert(mimeType.toString() === "text/html;charset=utf-8");

console.assert(mimeType.type === "text");
console.assert(mimeType.subtype === "html");
console.assert(mimeType.essence === "text/html");
console.assert(mimeType.parameters.get("charset") === "utf-8");

mimeType.parameters.set("charset", "windows-1252");
console.assert(mimeType.parameters.get("charset") === "windows-1252");
console.assert(mimeType.toString() === "text/html;charset=windows-1252");
Example truncated — see the full README.

whatwg-mimetype vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
whatwg-mimetypethis page03MIT7 months ago
content-type201.5M6MIT13 days ago
node-fetch192.4M9MIT13 days ago
undici169.8M15MIT13 days ago
cross-fetch38M2MIT13 days ago
http-errors169.2M7MIT13 days ago

Dependencies

Declared by whatwg-mimetype v5.0.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (5)

@domenic/eslint-config ^4.0.1@exodus/bytes ^1.9.0c8 ^10.1.3eslint ^9.39.2printable-string ^0.3.0

Used by

Popular packages that depend on whatwg-mimetype.

Relationship graph

Dependencies (left) and dependents (right) of whatwg-mimetype.

cheeriojsdomhappy-domwhatwg-mimetype
whatwg-mimetype dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 222 days apart.

Recent versions of whatwg-mimetype
VersionPublishedSizeLicense
5.0.0latest7 months ago42 KBMIT
4.0.02 years ago16 KBMIT
3.0.05 years ago16 KBMIT
2.3.07 years ago16 KBMIT
2.2.08 years ago16 KBMIT
2.1.08 years agoMIT
2.0.18 years agoMIT
2.0.08 years agoMIT

Overview

whatwg-mimetype is an npm package that parses, serializes, and manipulates MIME types, according to the WHATWG MIME Sniffing Standard. It has 3 known dependents in the graph. The latest version is 5.0.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need parses, serializes, and manipulates MIME types, according to the WHATWG MIME Sniffing Standard and value a focused solution.

When not to use it

Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.

Pros

  • Clear open-source license (MIT).

Cons

  • No bundled TypeScript types (may require a separate @types package).

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Frequently asked questions

Should I use whatwg-mimetype?

Yes — whatwg-mimetype scores well across adoption, maintenance, weight, supply chain, and licensing. No download data reported for this package yet. Last published 233 days ago.

How do I install whatwg-mimetype?

Run `npm install whatwg-mimetype` to add whatwg-mimetype to your npm project.

What license is whatwg-mimetype released under?

whatwg-mimetype is distributed under the MIT license.

How popular is whatwg-mimetype?

npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on whatwg-mimetype.

Is whatwg-mimetype still maintained?

The most recent release of whatwg-mimetype (v5.0.0) was published 7 months ago.

Does whatwg-mimetype run install scripts?

No. whatwg-mimetype does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.