没有合适的资源?快使用搜索试试~ 我知道了~
p-retry:重试返回承诺或异步功能
共13个文件
js:2个
ts:2个
yml:2个
需积分: 5 0 下载量 60 浏览量
2021-03-29
15:08:22
上传
评论
收藏 9KB ZIP 举报
温馨提示
重试 重试返回承诺或异步功能 它执行指数补偿,并支持失败操作的自定义重试策略。 安装 $ npm install p-retry 用法 const pRetry = require ( 'p-retry' ) ; const fetch = require ( 'node-fetch' ) ; const run = async ( ) => { const response = await fetch ( 'https://sindresorhus.com/unicorn' ) ; // Abort retrying if the resource doesn't exist if ( response . status === 404 ) { throw new pRetry . AbortError ( response . statusText ) ; } retur
资源推荐
资源详情
资源评论
收起资源包目录
p-retry-main.zip (13个子文件)
p-retry-main
.gitignore 23B
package.json 824B
.npmrc 19B
index.js 2KB
test.js 4KB
.github
workflows
main.yml 450B
funding.yml 91B
license 1KB
readme.md 4KB
index.test-d.ts 662B
.gitattributes 19B
.editorconfig 175B
index.d.ts 3KB
共 13 条
- 1
资源评论
yilinwang
- 粉丝: 13
- 资源: 4617
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功