vtils

Home > utils > loopUntil

loopUntil() function

Signature:

export declare function loopUntil<T>(fn: () => AsyncOrSync<T>, condition: (res: T) => AsyncOrSync<boolean>, options: LoopUntilOptions): Promise<T>;

Parameters

Parameter Type Description
fn () => AsyncOrSync<T>  
condition (res: T) => AsyncOrSync<boolean>  
options LoopUntilOptions  

Returns:

Promise<T>