# jshttp/mime-types

The ultimate javascript content-type utility.

Repository: https://github.com/jshttp/mime-types
Canonical: https://ross.abutalabs.com/products/mime-types
Language: JavaScript
License: MIT
License Family: permissive
Topics: javascript, nodejs, mime, mime-types
Last push: 2026-06-02T16:15:48+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 85, release rhythm 33, longevity 100
- inputs: {"age_days": 4506, "days_push": 92, "days_rel": 286, "gap_med": 120.0, "n_releases_24m": 3}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1473, forks 151 (observed 2026-08-28T04:04:49.625482+00:00)

## What it is
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
- artifact type: library
- maturity: stable
- function: developer-tools, http-server
- domain: web-development, backend, developer-tools
- platform: -
- tags: mime, mime-types, content-type, http, mime-db, file-extensions, nodejs

## Member repositories
- jshttp/mime-types (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:49.625482+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:34:38.279728+00:00, confidence not recorded.
  - readme: https://github.com/jshttp/mime-types (fetched 2026-08-28T04:04:49.625482+00:00, sha e887145db273)
  - registry_npm: https://registry.npmjs.org/mime-types (fetched 2026-08-29T11:42:31.782420+00:00, sha 6ad739cbe1dd)
- Data as of 2026-08-30T08:39:29.467469+00:00.
