betolerant

0.1.1 • Public • Published

betolerant

NPM Version Build Status

let betolerant = require("betolerant");
 
betolerant(3 /*tries*/, 10000 /*timeout*/, function* {
    yield asyncOp();
    yield sleep(1000);
    result = yield checkAsyncOpResult();
    if (!result.failed) {
        throw Error("op failed");
    }
}).then(function(){
    // done;
}).catch(function(){
    // all three attemps timed out or failed
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    1
  • 0.1.0
    0
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i betolerant

Weekly Downloads

0

Version

0.1.1

License

MIT

Last publish

Collaborators

  • zf