# mroderick/PubSubJS

Dependency free publish/subscribe for JavaScript

Repository: https://github.com/mroderick/PubSubJS
Canonical: https://ross.abutalabs.com/products/pubsubjs
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2024-10-28T20:17:10+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": 5817, "days_push": 674, "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 4857, forks 459 (observed 2026-08-28T04:09:01.497712+00:00)

## What it is
PubSubJS is a dependency-free, topic-based publish/subscribe library for JavaScript. It decouples publishers from subscribers via asynchronous message delivery, with optional synchronous publication, and runs anywhere JavaScript executes.

## Use cases
- decouple components in a JavaScript app with an event bus
- publish and subscribe to named topics in the browser
- implement event-driven communication in a single-process Node.js app
- replace jQuery custom events with a lightweight pub/sub library
- broadcast messages between modules without direct dependencies

## When to choose
- you need a tiny (<1kb) dependency-free event bus
- you want asynchronous, loosely coupled communication within a single process
- you need compatibility with very old JavaScript environments (ES3)

## When to avoid
- you need multi-process or distributed messaging (use Redis Pub/Sub or a message queue)
- you need guaranteed message delivery, persistence, or ordering
- you already use a framework with a built-in event system

## Facets
- artifact type: library
- maturity: stable
- function: middleware, developer-tools
- domain: web-development, frontend, developer-tools
- platform: browser, cross-platform
- tags: pubsub, event-bus, publish-subscribe, dependency-free, event-driven, javascript, nodejs

## Member repositories
- mroderick/PubSubJS (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:01.497712+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-29T18:18:22.804487+00:00, confidence not recorded.
  - readme: https://github.com/mroderick/PubSubJS (fetched 2026-08-28T04:09:01.497712+00:00, sha 22a9296d7e35)
- Data as of 2026-08-30T08:39:29.467469+00:00.
