# developit/mitt

🥊 Tiny 200 byte functional event emitter / pubsub.

Repository: https://github.com/developit/mitt
Canonical: https://ross.abutalabs.com/products/mitt
Homepage: https://npm.im/mitt
Language: TypeScript
License: MIT
License Family: permissive
Topics: mitt, event-handlers, pubsub, tiny, event, event-bus, event-listener, eventemitter
Last push: 2024-08-14T08:58:20+00:00

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

## Adoption (not part of the score)
Stars 11900, forks 486 (observed 2026-08-28T04:10:50.437066+00:00)

## What it is
Mitt is a tiny (~200 byte gzipped) functional event emitter / pubsub library for JavaScript, with a wildcard '*' event type and typed event support in TypeScript. It works in any JavaScript runtime with no dependencies.

## Use cases
- emit and listen to events in the browser
- create a lightweight event bus for a frontend app
- pubsub communication between components
- typed event emitter in TypeScript
- replace Node's EventEmitter in a small bundle
- decouple modules with a wildcard event listener

## When to choose
- you need a minimal, dependency-free event emitter
- bundle size matters and you only need on/off/emit
- you want TypeScript-typed events
- you need wildcard subscription to all events

## When to avoid
- you need advanced features like once, async handlers, or event namespaces
- you're in Node.js and can use the built-in EventEmitter
- you need hierarchical or scoped event systems

## Facets
- artifact type: library
- maturity: stable
- function: middleware, developer-tools
- domain: web-development, frontend
- platform: browser, cross-platform
- tags: event-emitter, pubsub, event-bus, tiny, typescript, zero-dependency, javascript, nodejs

## Member repositories
- developit/mitt (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:50.437066+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-29T17:15:13.567466+00:00, confidence not recorded.
  - readme: https://github.com/developit/mitt (fetched 2026-08-28T04:10:50.437066+00:00, sha 1c6fa745603d)
  - registry_npm: https://registry.npmjs.org/mitt (fetched 2026-08-29T08:13:18.526549+00:00, sha 3b1618889cbc)
- Data as of 2026-08-30T08:39:29.467469+00:00.
