# ai/nanoevents

Simple and tiny (107 bytes) event emitter library for JavaScript

Repository: https://github.com/ai/nanoevents
Canonical: https://ross.abutalabs.com/products/nanoevents
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-07-22T18:00:05+00:00

## Health v2 (maintenance only)
Score: 84/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 93, release rhythm 62, longevity 100
- inputs: {"age_days": 3634, "days_push": 42, "days_rel": 42, "gap_med": 645, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1635, forks 52 (observed 2026-08-28T04:05:14.439027+00:00)

## What it is
A tiny (108 bytes) event emitter library for JavaScript with only `on` and `emit` methods. It supports typed events via TypeScript and returns unbind functions from listeners.

## Use cases
- add a lightweight pub/sub event system to a JavaScript app
- emit and subscribe to custom events in a TypeScript project
- mix event emitter behavior into a class
- replace Node.js EventEmitter in a browser bundle to save bytes
- unbind event listeners without keeping callback references

## When to choose
- you need a minimal, dependency-free event emitter for browser or ES module code
- bundle size is critical and you only need on/emit
- you want typed events with TypeScript

## When to avoid
- you need Node.js EventEmitter compatibility like once, removeListener, or max listeners
- you need wildcard events, namespaces, or async listeners
- you need a full-featured event bus with aliases

## Facets
- artifact type: library
- maturity: stable
- function: middleware, developer-tools
- domain: web-development, frontend, developer-tools
- platform: browser, cross-platform
- tags: event-emitter, pub-sub, tiny-library, typescript, es-modules, nodejs

## Member repositories
- ai/nanoevents (main) score 84

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:14.439027+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-30T03:47:00.003010+00:00, confidence not recorded.
  - readme: https://github.com/ai/nanoevents (fetched 2026-08-28T04:05:14.439027+00:00, sha 257c182eaa52)
  - registry_npm: https://registry.npmjs.org/nanoevents (fetched 2026-08-29T11:20:11.989048+00:00, sha d79b5181c749)
- Data as of 2026-08-30T08:39:29.467469+00:00.
