regenerator
regenerator copied to clipboard
Source transformer enabling ECMAScript 6 generator functions in JavaScript-of-today.
I was tempted to add this test to #408, but after some debugging I believe this is a bug with `@babel/plugin-transform-classes`, as demonstrated by [this babeljs.io/repl example](https://babeljs.io/repl/#?browsers=defaults%2C%20not%20ie%2011%2C%20not%20ie_mob%2011&build=&builtIns=false&corejs=3.6&spec=false&loose=false&code_lz=GYVwdgxgLglg9mABAKgOYFMwAoCUiDeAUIogE7pQilIQA2AhgM6MHEkoDaAnjOrQCaIAjACYAzAF0sADzxF27cpWqIefQdIDcbEgF82-3UA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=env%2Creact%2Cstage-2&prettier=false&targets=&version=7.14.8&externalPlugins=%40babel%2Fplugin-transform-classes%407.14.5). Specifically, when this...
There's no separate module export any more, so there's no point in explicitly importing the runtime path.
> When "importRuntime" is true, regenerator doesn't assume that > `regeneratorRuntime` is available globally, but it injects an `import` > statement (or `require`, depending on the source type) Example output:...
please Append the name of the generator function to the generator object after it executes
function `isGeneratorFunction` doesn't work properly in IE 10,so I add a line code to fix it.
Ive noticed in the other PR that there was some mismatch between PR code style and the desired style of the repo. This was also a slight problem for me...
When both operands to the subscripting operator are yield expressions, it does not compile correctly. The latter expression (the index) is erroneously used for both operands.