Skip to content

轮询js库,带有开始,停止,和错误重试功能。

Notifications You must be signed in to change notification settings

huangyan321/make-it-poll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MAKE IT PULL

install

npm i make-it-poll

Usage

index.js

const makeItPoll = require('make-it-poll');
const obj = makeItPoll(
  () =>
    new Promise((resolve, reject) => {
      console.log('exec promise');
      resolve();
    }),
  1000,
  5000,
  3
);
obj.startGetDataPoll();
setTimeout(() => {
  obj.stopGetDataPoll();
}, 5000);


//exec promise
//exec promise
//exec promise
//exec promise
//exec promise

About

轮询js库,带有开始,停止,和错误重试功能。

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published