mime
npmv4.1.0TypeScriptA 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.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
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.
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.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| mimethis page | 136.4M | 6 | MIT | 1 year ago |
| mrmime | 37.2M | 3 | MIT | 1 day ago |
| path-parse | 0 | 1 | MIT | 1 day ago |
| type-fest | 337.8M | 6 | (MIT OR CC0-1.0) | 1 day ago |
| mime-types | 185.3M | 9 | MIT | 1 day ago |
| lodash | 147.8M | 20 | MIT | 1 day ago |
Dependencies
Declared by mime v4.1.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (12)
Used by
Popular packages that depend on mime.
Next generation testing framework powered by Vite
UI for Vitest
Runtime typescript and ESM support for Node.js
Leaner CSS
Browser running for Vitest
No description provided.
Relationship graph
Dependencies (left) and dependents (right) of mime.
Frequently installed together
TypeScript definitions for node
Next generation testing framework powered by Vite
Universal filesystem path utils
Native-ESM powered web dev build tool
Message based Two-way remote procedure call
Public API for OpenTelemetry
Shared Vitest utility functions
A small library to print colourful messages.
An AST-based pattern checker for JavaScript.
The optimized & lightweight middleware for serving requests to static assets
Modify strings, generate sourcemaps
Vitest module mocker implementation
Release history
4 releases in the last two years, typically about 71 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 4.1.0latest | 1 year ago | 157 KB | MIT |
| 4.0.7 | 1 year ago | 105 KB | MIT |
| 4.0.6 | 1 year ago | 103 KB | MIT |
| 4.0.5 | 1 year ago | 144 KB | MIT |
| 4.0.4 | 2 years ago | 134 KB | MIT |
| 4.0.3 | 2 years ago | 133 KB | MIT |
| 4.0.2 | 2 years ago | 98 KB | MIT |
| 4.0.1 | 2 years ago | 91 KB | MIT |
| 4.0.0 | 2 years ago | 91 KB | MIT |
| 4.0.0-beta.1 | 3 years ago | 92 KB | MIT |
| 4.0.0-beta.0 | 3 years ago | 53 KB | MIT |
| 3.0.0 | 4 years ago | 59 KB | MIT |
| 2.6.0 | 4 years ago | 59 KB | MIT |
| 2.5.2 | 5 years ago | 58 KB | MIT |
| 2.5.0 | 5 years ago | 58 KB | MIT |
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
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.