Are there any converters or techniques available for converting Javascript 1.7 code with its new language features to Javascript 1.6?
I'm most interested in iterator generators and the yield
keyword. The script engine I use is only 1.6, but iterator generators would make for much better code. Writing it by hand seems complicated.
I've tried writing it in C#, decompiling with ILSpy, and porting that to Javascript by hand. But that's a damn mess.
I've searched for such a convertor, but I've found nothing - perhaps due to the search terms being shared with irrelevant results in this case.