# staltz/callbag-basics

👜 Tiny and fast reactive/iterable programming library

Repository: https://github.com/staltz/callbag-basics
Canonical: https://ross.abutalabs.com/products/callbag-basics
Language: JavaScript
License: MIT
License Family: permissive
Topics: callbacks, reactive, iterables, observables, callbag
Last push: 2023-04-20T06:28:40+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 3138, "days_push": 1231, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1652, forks 43 (observed 2026-08-28T04:05:17.072086+00:00)

## What it is
A tiny and fast JavaScript library implementing the callbag spec, providing basic factories and operators for reactive stream and iterable programming. The same operators work for both push-based event streams and pull-based iterables, with a modular design where everything is a standalone utility function.

## Use cases
- handle click events reactively in the browser
- process async event streams with map/filter/take operators
- transform iterables with the same operators used for streams
- build lightweight reactive apps without RxJS bundle size
- flatten promises and events into unified streams
- create interval-based tick streams for polling

## When to choose
- you want a tiny (~7kB) alternative to RxJS or xstream
- you need one operator set that works for both observables and iterables
- you prefer a modular, spec-based design with no core library
- performance in stream processing is critical

## When to avoid
- you need a batteries-included reactive library with schedulers and subjects
- your team already knows RxJS and ecosystem tooling matters more than size
- you need extensive documentation and community support
- you require frequent updates or long-term active maintenance

## Facets
- artifact type: library
- maturity: maintenance
- function: middleware, streaming
- domain: web-development, frontend, developer-tools
- platform: browser
- tags: reactive-programming, observables, iterables, callbag, functional-programming, streams, nodejs, javascript

## Member repositories
- staltz/callbag-basics (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:17.072086+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:45:01.015059+00:00, confidence not recorded.
  - readme: https://github.com/staltz/callbag-basics (fetched 2026-08-28T04:05:17.072086+00:00, sha a578da1c89a3)
  - registry_npm: https://registry.npmjs.org/callbag-basics (fetched 2026-08-29T11:18:11.070506+00:00, sha 0e2bd3122b4f)
- Data as of 2026-08-30T08:39:29.467469+00:00.
