Simple Retry framework with deferred.
const Retry = require("retries");
Retry(func: Function|Promise, options: Object).then((result)=>{
console.log(result);
}).catch((err)=>{
console.log("err", err);
});
options
Attr | Type | Default |
---|---|---|
times | Int | 5 |
interval | Number | 1000 |
exponentialBackoff | Bool | true |