@iocmd/wait
v2.1.0
Published
promisified setTimeout
Downloads
963
Readme
Wait
Promisified setTimeout
Install
npm i @iocmd/wait
Example
await wait(console.log, 'hello');
// log "hello" in next loop
await wait(1000, console.log, 'hello');
// log "hello" in a second
await wait(1000);
// wait for a second
Related
hold-up - setInterval with promises, counter and error handling
currify - translate the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single or more arguments
fullstore - functional variables
wraptile - translate the evaluation of a function that takes multiple arguments into evaluating a sequence of 2 functions, each with a any count of arguments
License
MIT