mrmime
npmv2.0.1TypeScriptA tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename
Adopt with care
mrmime is usable, with caveats. Last published 569 days ago.
- AAdoption: grade A, Excellent.
37.2M downloads per week and 3 known dependents.
- CMaintenance: grade C, Fair — worth a look.
Last published 569 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 32 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 mrmime 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 >=10
- Module format
- ESM + CommonJS
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the mrmime README.
import { lookup, mimes } from 'mrmime';
// Get a MIME type
// ---
lookup('txt'); //=> "text/plain"
lookup('.txt'); //=> "text/plain"
lookup('a.txt'); //=> "text/plain"
// Unknown extension
// ---
lookup('.xyz'); //=> undefined
// Add extension to dictionary
// ---mrmime 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 |
|---|---|---|---|---|
| mrmimethis page | 37.2M | 3 | MIT | 1 year ago |
| mime | 136.4M | 6 | MIT | 1 day ago |
| mime-types | 185.3M | 9 | MIT | 1 day ago |
| mime-db | 0 | 2 | MIT | 1 day ago |
| rechoir | 0 | 1 | MIT | 1 day ago |
| make-error | 0 | 1 | ISC | 1 day ago |
Dependencies
Declared by mrmime v2.0.1. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (2)
Used by
Popular packages that depend on mrmime.
Native-ESM powered web dev build tool
The optimized & lightweight middleware for serving requests to static assets
Framework for building one portable devtool integration that runs in any viewer.
Relationship graph
Dependencies (left) and dependents (right) of mrmime.
Frequently installed together
Simple yet powerful framework for building command-line apps.
Model Context Protocol implementation for TypeScript - Client package
Model Context Protocol implementation for TypeScript - Server package
A lightweight JavaScript debugging utility, forked from debug, featuring TypeScript and ESM support.
URL utils for humans
Missing ECMAScript module utils for Node.js
Universal filesystem path utils
A fast and minimal alternative to globby and fast-glob
Run multiple promise-returning & async functions with limited concurrency
Minimal H(TTP) framework built for high performance and portability.
The modular and type safe schema library for validating structural data
Structured diagnostic code library
Release history
1 release in the last two years, typically about 425 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 2.0.1latest | 1 year ago | 32 KB | MIT |
| 2.0.0 | 2 years ago | 32 KB | MIT |
| 1.0.1 | 4 years ago | 30 KB | MIT |
| 1.0.0 | 4 years ago | 30 KB | MIT |
| 0.1.2 | 12 years ago | — | MIT |
| 0.1.1 | 12 years ago | — | MIT |
| 0.1.0 | 12 years ago | — | MIT |
Overview
mrmime is an npm package that a tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename. It is extremely widely used, with about 37.2M downloads per week and 3 known dependents in the graph. The latest version is 2.0.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need a tiny (2.8kB) and fast utility for getting a MIME type from an extension or filename 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 (37.2M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (2 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Frequently asked questions
Should I use mrmime?
mrmime is usable, with caveats. Last published 569 days ago.
How do I install mrmime?
Run `npm install mrmime` to add mrmime to your npm project.
What license is mrmime released under?
mrmime is distributed under the MIT license.
How popular is mrmime?
mrmime has approximately 37,208,655 downloads per week and 3 known dependent packages.
Is mrmime still maintained?
The most recent release of mrmime (v2.0.1) was published 1 year ago.
Does mrmime run install scripts?
No. mrmime does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.