Executes an iteratee at least once, then repeatedly until the async test returns true. Similar to until but the test is evaluated after each iteration (do-until loop).
Async body executed at least once, then until test is true.
test
Exit condition evaluated after each iteration.
Optional
Cancellable configuration options.
A cancellable handle that resolves when the loop exits.
let done = false;let ticks = 0;const handle = doUntil( async (token) => { await token.sleep(5); ticks++; if (ticks >= 2) done = true; }, async () => done,);await handle;// ticks === 2 Copy
let done = false;let ticks = 0;const handle = doUntil( async (token) => { await token.sleep(5); ticks++; if (ticks >= 2) done = true; }, async () => done,);await handle;// ticks === 2
Executes an iteratee at least once, then repeatedly until the async test returns true. Similar to until but the test is evaluated after each iteration (do-until loop).