regenerator-runtime

The runtime library that powers Babel-compiled ES6 generator and async/await functions in ES5 environments

Library
npm
v0.14.1
3,824stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
49/100Fair
Development Activity0
Maintenance20
Community76
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
61/100Good
Architecture70
Code Quality72
Innovation60
Learning Curve40

regenerator-runtime is the small (under 1KB compressed) support library required by code that the Regenerator source transform (used internally by Babel) produces when compiling ES2015 generator functions and async/await syntax down to plain ES5. Any transpiled function using yield or async/await calls into this runtime’s wrapGenerator machinery at execution time, so it must be present wherever that compiled output runs.

What You Get

  • The regeneratorRuntime global (or importable module) that implements generator/iterator state-machine semantics in plain ES5
  • Support for yield, yield* delegation, and async/await (desugared to generators) in environments without native support
  • A tiny (<1KB compressed) footprint since it only implements the runtime state machine, not the transform itself
  • Battle-tested compatibility, since it’s the de facto runtime shipped by Babel’s own generator/async transforms across virtually the entire JS build ecosystem

Common Use Cases

  • Automatically pulled in as a dependency when Babel or another compiler transpiles generator/async functions for older browser or JS engine targets
  • Polyfilling generator/async support in legacy environments (old browsers, certain embedded JS engines) that lack native support
  • Powering libraries and frameworks that ship pre-compiled ES5 bundles but use async/await or generators internally in their source
  • Ensuring consistent generator/async behavior across a build’s transpiled output regardless of the target runtime’s native support level

Under The Hood

Architecture The published package’s implementation lives at packages/runtime/runtime.js (761 lines) inside the larger facebook/regenerator monorepo, which also contains the actual source-to-source regenerator transform (lib/, main.js) that rewrites function*/yield/async syntax into calls against this runtime. The runtime implements a GeneratorFunctionPrototype-like object plus a wrap() function that turns a specially-shaped compiled function body into a proper iterator object with .next()/.throw()/.return(), replicating native generator semantics entirely in ES5 JavaScript. Tech Stack Plain, dependency-free JavaScript with no build step of its own for the runtime file — it’s published essentially as-authored — while the sibling regenerator transform package (which produces code that calls into this runtime) uses Babel/AST tooling internally. Code Quality The monorepo’s test/ directory includes dedicated runtime tests (test/runtime.js) alongside broader transform conformance tests (tests.es6.js, class.js, async.js, regression.js) that exercise edge cases like frozen intrinsics and non-native environments — reflecting the runtime’s role as foundational, widely-depended-upon infrastructure where regressions have outsized blast radius. API Design Consumers essentially never call this package’s API directly by hand — it’s an implicit dependency injected by a compiler (Babel) into transpiled output, so its ‘API’ is really the internal contract between the regenerator transform and this runtime, not a public surface meant for direct human use.

Used by 15 apps in this directory

TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,526

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
53
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated 9 months ago
TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,010

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
61
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 1 months ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,846

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

View details
91
Repo Health
77
Technical
64
Dependency
Built with
TypeScript97%
Updated yesterday
PHP
63%
Other

BillaBear

Ecommerce · Invoicing Finance

754

Self-hostable subscription management and billing platform with Stripe integration, tax automation, configurable workflows, and Twig-based document generation.

View details
47
Repo Health
66
Technical
66
Dependency
Built with
PHP63%
Vue18%
Gherkin13%
Updated 2 months ago
Go
52%
MIT

Bytebase

Devops

14,396

An open-source database CI/CD and DevSecOps platform — schema migration review, GitOps-driven changes, data masking, and access control across MySQL, PostgreSQL, Oracle, Snowflake, MongoDB, and more.

View details
92
Repo Health
73
Technical
69
Dependency
Built with
Go52%
TypeScript39%
Updated today
TypeScript
48%
AGPL 3.0

Grafana

Monitoring · Analytics

76,300

The open-source observability platform that unifies metrics, logs, and traces from any data source into dynamic, queryable dashboards.

View details
95
Repo Health
91
Technical
65
Dependency
Built with
TypeScript48%
Go46%
Updated today
TypeScript
98%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

485

Open-source GraphQL schema registry and observability platform with breaking change detection, federation support, and CI/CD integration for teams of any size.

View details
90
Repo Health
81
Technical
70
Dependency
Built with
TypeScript98%
Updated today
TypeScript
80%
MIT

LibreChat

Developer Tools · AI Assistants

42,216

Unite every major AI model in one self-hosted chat platform with agents, code execution, MCP tools, and enterprise authentication.

View details
93
Repo Health
81
Technical
68
Dependency
Built with
TypeScript80%
JavaScript19%
Updated today
Ruby
60%
AGPL 3.0

Mastodon

Social Media

50,221

Run your own federated social network on the open ActivityPub standard with no ads, no algorithms, and no corporate control over your community.

View details
95
Repo Health
81
Technical
71
Dependency
Built with
Ruby60%
TypeScript22%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search