2.1.0 • Published 2 years ago

@iocmd/wait v2.1.0

Weekly downloads
64
License
MIT
Repository
github
Last release
2 years ago

Wait License NPM version Build Status Coverage Status

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