regenerator-runtime

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

Library
npm
v0.14.1
3,821 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
49 /100 Fair
Development Activity 0
Maintenance 20
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
61 /100 Good
Architecture 70
Code Quality 72
Innovation 60
Learning Curve 40

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

Databases · Low Code Platforms

15,623

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

View details
71
Repo Health
77
Technical
60
Dependency
Built with
TypeScript 72%
Java 22%
Updated 3 weeks ago
TypeScript
96%
Other

Amplication

AI Code Assistants · Automation · Developer Tools

16,015

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
58
Repo Health
84
Technical
60
Dependency
Built with
TypeScript 96%
Updated 3 months ago
TypeScript
97%
AGPL 3.0

Bigcapital

Invoicing Finance

3,916

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

View details
90
Repo Health
77
Technical
61
Dependency
Built with
TypeScript 97%
Updated 6 days ago
PHP
63%
Other

BillaBear

Ecommerce · Invoicing Finance

761

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

View details
76
Repo Health
66
Technical
65
Dependency
Built with
PHP 63%
Vue 18%
Gherkin 13%
Updated 2 weeks ago
Go
49%
MIT

Bytebase

Devops

14,512

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
68
Dependency
Built with
Go 49%
TypeScript 42%
Updated 4 days ago
TypeScript
48%
AGPL 3.0

Grafana

Analytics · Monitoring

76,962

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
63
Dependency
Built with
TypeScript 48%
Go 46%
Updated 4 days ago
TypeScript
99%
MIT

GraphQL Hive

Developer Tools · Devops · Monitoring

484

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
69
Dependency
Built with
TypeScript 99%
Updated 4 days ago
TypeScript
82%
MIT

LibreChat

AI Assistants · Developer Tools

45,009

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
65
Dependency
Built with
TypeScript 82%
JavaScript 17%
Updated 4 days ago
Ruby
59%
AGPL 3.0

Mastodon

Social Media

50,335

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
70
Dependency
Built with
Ruby 59%
TypeScript 24%
Updated 4 days ago

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