Re:Show HN: Kneden – Transpile ES7 Async/await to ES6 Promis...
by david-given on Saturday February 13, 2016 @10:03AM
(#11094169)
Is Babel's generator transpiling support good enough to allow this to be transpiled down to ES5?
[ Parent
| on HN ]
Re:Show HN: Kneden – Transpile ES7 Async/await to ES6 Promis...
by skrebbel on Saturday February 13, 2016 @10:32AM
(#11094288)
It's actually how babel's "standard" async/await support works. First to generators, then generators to ES5-compatible code using Facebook's Regenerator (which includes a polyfill).
Pragmatic and it works, but the code isn't pretty. Which is why Kneden was made.
Re:Show HN: Kneden – Transpile ES7 Async/await to ES6 Promis...
by marten-de-vries on Saturday February 13, 2016 @10:11AM
(#11094199)
It is, the resulting code is just a bit harder to read, and the babel-polyfill is required. It's quite good considering they're transpiling generators actually, but it's hard to beat something working on a higher level (async/await straight to promises, like Kneden does.)