light-async-polling
v1.0.2
Published
Super light javascript function for making polling
Downloads
107
Maintainers
Readme
:arrows_clockwise: light-async-polling
Super light javascript function for making polling
:fire: Usage:
const polling = require('light-async-polling')
await polling(async () => {
const r = yourFunction()
if (
r
) {
return true //stop polling
} else {
return false //continue polling
}
}, 2000) //milliseconds
:video_game: Run examples:
npm run examples