getify/CAF
Cancelable Async Flows (CAF) observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 3160
- days_rel: n/a
- days_push: 1467
- n_releases_24m: 0
Adoption not part of the score
1360 stars · 49 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
CAF (Cancelable Async Flows) is a JavaScript library that wraps function* generators so they behave like async functions while supporting external cancellation via cancellation tokens. It also includes CAG for emulating async generators, with cancellation signals that cascade across chained calls.
Use cases
- cancel an async operation like a timed-out ajax request
- treat generators as cancelable async functions in JavaScript
- cascade a single cancellation signal through a chain of async calls
- abort a promise chain mid-flight when a timeout elapses
- emulate async generators in environments without native support
When to choose
- you need to cancel in-flight async flows, which native async functions can't do
- you want synchronous-looking async logic with cooperative cancellation tokens
- you're on ES2018+ JavaScript in Node or the browser
When to avoid
- you need to support pre-ES2018 environments without transpiling
- your async operations are short-lived and cancellation isn't needed
- you prefer native async/await and AbortController-based cancellation
Facets
library · maturity maintenance
concurrency developer-tools developer-tools web-development browser cross-platform async promises generators cancellation cancel-token javascript nodejs
2 sources
- readme: https://github.com/getify/CAF · fetched 2026-08-28 · 9e15bcba326c
- registry_npm: https://registry.npmjs.org/caf · fetched 2026-08-29 · 652967f16a8f
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| getify/CAF | main | 32 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem