</>PackageGraphPackageGraph

mime

npmv4.1.0TypeScript

A comprehensive library for mime-type mapping

Safe to adopt

Yes — mime scores well across adoption, maintenance, weight, supply chain, and licensing. 136.4M downloads per week and 6 known dependents. Last published 362 days ago. 4 releases in the last 2 years.

  • AAdoption: grade A, Excellent.

    136.4M downloads per week and 6 known dependents.

  • BMaintenance: grade B, Good.

    Last published 362 days ago. 4 releases in the last 2 years.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 157 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • 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 mime 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.

157 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 >=16
Module format
ESM only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the mime README.

javascriptFull README ↗
import mime from 'mime';

mime.getType('txt');                    // ⇨ 'text/plain'
mime.getExtension('text/plain');        // ⇨ 'txt'

mime vs the alternatives

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

PackageWeekly downloadsDependentsLicenseLast release
mimethis page136.4M6MIT1 year ago
mrmime37.2M3MIT1 day ago
path-parse01MIT1 day ago
type-fest337.8M6(MIT OR CC0-1.0)1 day ago
mime-types185.3M9MIT1 day ago
lodash147.8M20MIT1 day ago

Dependencies

Declared by mime v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (12)

@types/mime-db 1.43.6@types/mime-types 3.0.1@types/node 24.3.1@typescript-eslint/eslint-plugin 8.43.0@typescript-eslint/parser 8.43.0chalk 5.6.2mime-score 2.0.4mime-types 3.0.1prettier 3.6.2release-please 17.1.2runmd 1.4.1typescript 5.9.2

Used by

Popular packages that depend on mime.

Relationship graph

Dependencies (left) and dependents (right) of mime.

Frequently installed together

Release history

4 releases in the last two years, typically about 71 days apart.

Recent versions of mime
VersionPublishedSizeLicense
4.1.0latest1 year ago157 KBMIT
4.0.71 year ago105 KBMIT
4.0.61 year ago103 KBMIT
4.0.51 year ago144 KBMIT
4.0.42 years ago134 KBMIT
4.0.32 years ago133 KBMIT
4.0.22 years ago98 KBMIT
4.0.12 years ago91 KBMIT
4.0.02 years ago91 KBMIT
4.0.0-beta.13 years ago92 KBMIT
4.0.0-beta.03 years ago53 KBMIT
3.0.04 years ago59 KBMIT
2.6.04 years ago59 KBMIT
2.5.25 years ago58 KBMIT
2.5.05 years ago58 KBMIT

Overview

mime is an npm package that a comprehensive library for mime-type mapping. It is extremely widely used, with about 136.4M downloads per week and 6 known dependents in the graph. The latest version is 4.1.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need a comprehensive library for mime-type mapping and value a battle-tested, widely-adopted solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Large, well-established user base (136.4M weekly downloads).
  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

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

Maintainers

Keywords

Funding

Frequently asked questions

Should I use mime?

Yes — mime scores well across adoption, maintenance, weight, supply chain, and licensing. 136.4M downloads per week and 6 known dependents. Last published 362 days ago. 4 releases in the last 2 years.

How do I install mime?

Run `npm install mime` to add mime to your npm project.

What license is mime released under?

mime is distributed under the MIT license.

How popular is mime?

mime has approximately 136,354,710 downloads per week and 6 known dependent packages.

Is mime still maintained?

The most recent release of mime (v4.1.0) was published 1 year ago.

Does mime run install scripts?

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