Wait until a given callback returns true. Works great with async/await.
importuntilfrom'async-until';awaituntil(()=>something===someOtherThing);// Or, more verboseawaituntil(()=>something===someOtherThing,{timeout: 500,failMsg: 'Nope, it does not.',});