@iocmd/wait
promisified setTimeout
Last updated 6 years ago by coderaiser .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @iocmd/wait 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.1.0                                ...           latest (4 years ago)

3 Versions

  • 2.1.0                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.0.0                                ...           6 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (0)
None
Dev Dependencies (11)
Dependents (2)

Copyright 2013 - present © cnpmjs.org | Home |