jshttp/mime-types
The ultimate javascript content-type utility. observed · 2026-08-28
Health v2 · maintenance only
70/100
- Activity 85
- Release rhythm 33
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 120.0
- age_days: 4506
- days_rel: 286
- days_push: 92
- n_releases_24m: 3
Adoption not part of the score
1473 stars · 151 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Node.js JavaScript utility library that looks up MIME content-types from file extensions or paths and constructs full Content-Type headers with charset parameters. Its MIME data comes from the mime-db package, and it offers a no-fallback API compatible with mime 1.x.
Use cases
- get the mime type for a file extension in node
- build a content-type header for an http response
- look up the media type of a filename like file.html
- determine the content type of an uploaded file
- map file extensions to mime types in javascript
- add a default charset to a content-type string
When to choose
- You need fast, reliable MIME type lookup or Content-Type header construction in a Node.js application
- You want no-fallback behavior that returns false for unknown types so you can apply your own default like application/octet-stream
- You want a simple require-and-call API compatible with mime 1.x
When to avoid
- You need to define custom MIME types at runtime, since .define() functionality is intentionally absent
- You want automatic fallback to a default type instead of false for unrecognized inputs
- You need a browser-only solution without a bundler, as this is a Node.js registry module
Facets
library · maturity stable
developer-tools http-server web-development backend developer-tools mime mime-types content-type http mime-db file-extensions nodejs
2 sources
- readme: https://github.com/jshttp/mime-types · fetched 2026-08-28 · e887145db273
- registry_npm: https://registry.npmjs.org/mime-types · fetched 2026-08-29 · 6ad739cbe1dd
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| jshttp/mime-types | main | 70 |
For agents
markdown · JSON · MCP: product_card(name="jshttp/mime-types")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem