{"id":13508922,"url":"https://github.com/facebook/regenerator","last_synced_at":"2025-12-30T02:02:54.826Z","repository":{"id":37976351,"uuid":"13346571","full_name":"facebook/regenerator","owner":"facebook","description":"Source transformer enabling ECMAScript 6 generator functions in JavaScript-of-today.","archived":false,"fork":false,"pushed_at":"2024-02-29T11:04:34.000Z","size":8959,"stargazers_count":3837,"open_issues_count":81,"forks_count":1157,"subscribers_count":90,"default_branch":"main","last_synced_at":"2025-01-27T23:07:38.058Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://facebook.github.io/regenerator/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/facebook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-05T14:37:03.000Z","updated_at":"2025-01-25T10:49:53.000Z","dependencies_parsed_at":"2023-02-12T22:00:43.998Z","dependency_job_id":"dff4bb64-51c5-491c-872c-525dc0a53335","html_url":"https://github.com/facebook/regenerator","commit_stats":{"total_commits":1026,"total_committers":74,"mean_commits":"13.864864864864865","dds":0.5077972709551657,"last_synced_commit":"cb755fd82c648cbc5307a5a2d61cdd598e698fc4"},"previous_names":[],"tags_count":205,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fregenerator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fregenerator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fregenerator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/facebook%2Fregenerator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/facebook","download_url":"https://codeload.github.com/facebook/regenerator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237036580,"owners_count":19244669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T02:01:00.495Z","updated_at":"2025-10-18T23:31:04.773Z","avatar_url":"https://github.com/facebook.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Transpilers"],"sub_categories":[],"readme":"regenerator [![Build Status](https://travis-ci.org/facebook/regenerator.svg?branch=master)](https://travis-ci.org/facebook/regenerator)\n===\n\nThis package implements a fully-functional source transformation that\ntakes the syntax for generators/`yield` from [ECMAScript 2015 or ES2015](http://www.ecma-international.org/ecma-262/6.0/) and [Asynchronous Iteration](https://github.com/tc39/proposal-async-iteration) proposal and\nspits out efficient JS-of-today (ES5) that behaves the same way.\n\nA small runtime library (less than 1KB compressed) is required to provide the\n`wrapGenerator` function. You can install it either as a CommonJS module\nor as a standalone .js file, whichever you prefer.\n\nInstallation\n---\n\nFrom npm:\n```sh\nnpm install -g regenerator\n```\n\nFrom GitHub:\n```sh\ncd path/to/node_modules\ngit clone git://github.com/facebook/regenerator.git\ncd regenerator\nnpm install .\nnpm test\n```\n\nUsage\n---\n\nYou have several options for using this module.\n\nSimplest usage:\n```sh\nregenerator es6.js \u003e es5.js # Just the transform.\nregenerator --include-runtime es6.js \u003e es5.js # Add the runtime too.\nregenerator src lib # Transform every .js file in src and output to lib.\n```\n\nProgrammatic usage:\n```js\nvar es5Source = require(\"regenerator\").compile(es6Source).code;\nvar es5SourceWithRuntime = require(\"regenerator\").compile(es6Source, {\n  includeRuntime: true\n}).code;\n```\n\nAST transformation:\n```js\nvar recast = require(\"recast\");\nvar ast = recast.parse(es6Source);\nast = require(\"regenerator\").transform(ast);\nvar es5Source = recast.print(ast);\n```\n\nHow can you get involved?\n---\n\nThe easiest way to get involved is to look for buggy examples using [the\nsandbox](http://facebook.github.io/regenerator/), and when you find\nsomething strange just click the \"report a bug\" link (the new issue form\nwill be populated automatically with the problematic code).\n\nAlternatively, you can\n[fork](https://github.com/facebook/regenerator/fork) the repository,\ncreate some failing tests cases in [test/tests.es6.js](test/tests.es6.js),\nand send pull requests for me to fix.\n\nIf you're feeling especially brave, you are more than welcome to dive into\nthe transformer code and fix the bug(s) yourself, but I must warn you that\nthe code could really benefit from [better implementation\ncomments](https://github.com/facebook/regenerator/issues/7).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebook%2Fregenerator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffacebook%2Fregenerator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffacebook%2Fregenerator/lists"}