retry-if-err
v0.0.2
Published
when catch promise error, retry
Downloads
2
Readme
retry-if-err
执行promise
函数,如碰到错误,进行重试。then
和catch
返回的参数保持与原函数fn
一致。
install
npm install retry-if-err --save
usage
const retryIfErr = require('retry-if-err')
retryIfErr(fn, tryCount, tryInterval, ...params).then().catch()