finds.dev

staltz/callbag-basics

👜 Tiny and fast reactive/iterable programming library

View on GitHub

★ 1,654JavaScriptMITupdated Apr 2023

// the take

callbag-basics is a thin re-export of operators and factories implementing the callbag spec, where observables and iterables share the same push/pull protocol so the same map/filter/take functions work on both. It's for someone who wants reactive-stream primitives without taking on RxJS or xstream's size, or who wants to understand reactive programming from first principles instead of through a big framework.

Actually tiny — 7kB, and there's no core library at all, just plain functions, so a bundler can tree-shake unused operators for free. The push/pull duality is the real idea here: the same pipe() of map/filter/take works whether the source is a DOM event stream or a generator, which RxJS and most Iterable libs don't unify. There's a perf/ directory with real benchmarks against xstream and RxJS backing the speed claim rather than just asserting it in the README.

This package is a bundle of ~20 separate micro-packages (callbag-map, callbag-filter, callbag-from-event, etc.), each its own repo with its own versioning and bus factor — auditing or patching this dependency tree is a lot more work than auditing one library. Last push was April 2023 and the contributing section literally says 'build it yourself' instead of taking PRs, so don't expect bug fixes or new operators upstream. There's a single test.js at the root and no visible CI config, so test coverage and correctness guarantees are thin. Error propagation, backpressure, and cancellation semantics aren't explained in this README at all — you have to go read the external callbag spec wiki, which is a rough onboarding experience for something sold as beginner-friendly.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
1,654
Forks
43
Language
JavaScript
License
MIT
Last commit
20 Apr 2023

// nearby

If callbag-basics isn't quite it.

All repos →