yield
to ES5 semanticsTests: pvdz.ee/project/unyield/tests.html
Known wontfixes: finally
, catch
var stuff, ASI related transformation bugs, multiple yields in the same expression (same statement is fine), any yield
inside eval
.
This is a nearly complete "clean-room" implementation of translating generators or yield to ES5, allowing you to use generators in current browsers. For more solid, supported solutions see Facebook's Regenerator or Google's Traceur.