A generator (like Python) for javascript