# broofa/mime

Mime types for JavaScript

Repository: https://github.com/broofa/mime
Canonical: https://ross.abutalabs.com/products/broofa-mime
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-05T18:09:16+00:00

## Health v2 (maintenance only)
Score: 71/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 96, release rhythm 23, longevity 100
- inputs: {"age_days": 6034, "days_push": 28, "days_rel": 355, "gap_med": 106, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2355, forks 321 (observed 2026-08-28T04:06:40.562963+00:00)

## What it is
A dependency-free JavaScript/TypeScript library for MIME type information, mapping file extensions to MIME types and vice versa using mime-db data. It offers a compact API with full and lite builds and built-in TypeScript types.

## Use cases
- look up the mime type for a file extension
- get the file extension for a content-type header
- serve correct Content-Type headers in an http server
- map uploaded filenames to mime types
- get all extensions for a mime type like image/jpeg
- use a lightweight mime lookup in a browser bundle

## When to choose
- you need fast, dependency-free mime type lookup in Node, Deno, Bun, or the browser
- you want built-in TypeScript types and ESM support
- you need a compact lite build without unofficial x-/vnd-/prs. types

## When to avoid
- your runtime lacks ES2020/ESM support (use mime@3 instead)
- you need magic-byte content sniffing rather than extension-based lookup
- you need to call define() on the default mime object

## Facets
- artifact type: library
- maturity: stable
- function: serialization
- domain: web-development, developer-tools, files
- platform: bun, browser, cross-platform
- tags: mime-types, file-extensions, content-type, esm, typescript, nodejs, deno

## Member repositories
- broofa/mime (main) score 71

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:40.562963+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-30T02:36:26.386916+00:00, confidence not recorded.
  - readme: https://github.com/broofa/mime (fetched 2026-08-28T04:06:40.562963+00:00, sha d34a14cc0acb)
  - registry_npm: https://registry.npmjs.org/mime (fetched 2026-08-29T10:17:18.459409+00:00, sha 132bb77f44fc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
