babel / kneden

Transpile ES2017 async/await to vanilla ES6 Promise chains: a Babel plugin
ISC License
514 stars 41 forks source link

Support return inside loop #11

Closed marten-de-vries closed 8 years ago

marten-de-vries commented 8 years ago

Now it just acts like break. Maybe something like this:

var _break = {}
...
return _break;
// vs.
return;
// and:
return 'some-value'
...

... with a check at the end if _resp === _break.

marten-de-vries commented 8 years ago

Infrastructure is there (shared with #1); one change: using the function name instead of a separate variable. More economical. Only the check at the end is still missing, but that there's a failing test for that, so it should be fixed soon. Closing.