# tj/co

The ultimate generator based flow-control goodness for nodejs (supports thunks, promises, etc)

Repository: https://github.com/tj/co
Canonical: https://ross.abutalabs.com/products/co
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2020-12-15T07:22:26+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": 4836, "days_push": 2087, "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 11841, forks 778 (observed 2026-08-28T04:10:50.179918+00:00)

## What it is
co is a JavaScript library for Node.js and the browser that provides generator-based async control flow, letting you write non-blocking code using yield with promises, thunks, arrays, objects, and generators. It was a precursor to async/await and returns promises from co() calls.

## Use cases
- write async nodejs code with generators instead of callbacks
- run multiple promises in parallel with yield on arrays or objects
- wrap generator functions into promise-returning functions
- handle async errors with try/catch in generator code
- support thunks and promises in a unified async flow

## When to choose
- maintaining legacy Node.js codebases that predate async/await
- running on very old Node versions or browsers without async/await support
- you prefer generator-based coroutine style over promise chains

## When to avoid
- writing new code on modern Node.js or browsers with native async/await
- you need actively developed async tooling
- your environment lacks generator support and you don't want transpilation

## Facets
- artifact type: library
- maturity: maintenance
- function: concurrency, developer-tools
- domain: developer-tools, backend
- platform: browser
- tags: async-control-flow, generators, coroutines, promises, thunks, legacy-async, algorithms, nodejs, javascript

## Member repositories
- tj/co (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:50.179918+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-29T17:15:16.978781+00:00, confidence not recorded.
  - readme: https://github.com/tj/co (fetched 2026-08-28T04:10:50.179918+00:00, sha 9f2a46cce77c)
  - registry_npm: https://registry.npmjs.org/co (fetched 2026-08-29T08:13:29.372043+00:00, sha 10379d7fd784)
- Data as of 2026-08-30T08:39:29.467469+00:00.
