Loops over a generator until it finishes, calling callback. Useful if you don't care about the value generator produces, just the number of loops.
callback
until(count(5), () => {// do something 5 times}); Copy
until(count(5), () => {// do something 5 times});
If you want the value from the generator, use a for of loop as usual. If callback explicitly returns false, the generator is aborted.
for of
Generator to run
Code to call for each iteration
Loops over a generator until it finishes, calling
callback
. Useful if you don't care about the value generator produces, just the number of loops.If you want the value from the generator, use a
for of
loop as usual. Ifcallback
explicitly returns false, the generator is aborted.