Skip to content

Latest commit

 

History

History
9 lines (8 loc) · 288 Bytes

README.md

File metadata and controls

9 lines (8 loc) · 288 Bytes
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) })