Is there a better way to iterate over the results of a generator, my for loop is ugly:
for(let job = readyJob.next(); !job.done; job = readyJob.next()){ } <
Yes, if your environment already supports for...of:
for (var job of readyJob) { // ... }
If not, have seen this a couple of times:
var next; while (!(next = readyJob.next()).done) { var job = next.value; // ... }