npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

poll-stream

0.0.2

@soldair

npmHomeRepoSnykSocket
Downloads:0
$ npm install poll-stream
DailyWeeklyMonthlyYearly

node-poll-stream

poll a function on an interval emit data


var poller = require('poll-stream');

poller(function(cb){
  doSomething(cb);
},1000).pipe(process.stdout)

i subtract the time to run the async function from the polling interval to let it sample as close to interval as possible.