The generator support in browsers seems to be pretty good today http://caniuse.com/#search=Generators It might make sense to remove the custom generator library and start using the standard way of defining generators.