harrisiirak/cron-parser

suggestion for iterator example

choehn-signogy opened this issue · 0 comments

Just a thought. Instead of
while(true) inside the example for 'Iteration with limited timespan' you could use while(iterator.hasNext()) imho this would give you a clean exit condition instead of relying on an exception:

while(iterator.hasNext()) {
var obj = interval.next();
console.log('value:', obj.value.toString(), 'done:', obj.done);
}

cheers