var poll = require('simple-polling')
poll(function (cb) { setTimeout(function () { console.log('polling...'); cb(Math.random()) })})
.until(function (num) { return num > 0.9 })
.every(1000)
.timeout_at(15000)
.run(function (num) { console.log('Finished with: ' + num) })
-
Notifications
You must be signed in to change notification settings - Fork 3
Rafflecopter/node-poll
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A simple polling abstraction for repeating an asynchronous action until a desired outcome is achieved.
Resources
Stars
Watchers
Forks
Packages 0
No packages published