没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
捕捉错误 由。 一种高级功能,可以从promise中捕获错误。 安装 安装套件 $ npm install --save catch-errors 用法 const fetch = require ( 'node-fetch' ) ; const catchErrors = require ( 'catch-errors' ) ; async function load ( username ) { const response = await fetch ( `https://api.github.com/users/ ${ username } ` ) ; const user = await response . json ( ) ; console . log ( user . name ) ; } const wrappedLoad = catchErrors (
资源推荐
资源详情
资源评论
收起资源包目录
node-catch-errors-master.zip (12个子文件)
node-catch-errors-master
.eslintrc 387B
package.json 866B
.prettierrc 53B
LICENSE 1KB
src
index.js 146B
.gitignore 883B
CHANGELOG.md 270B
.npmrc 56B
README.md 1KB
.eslintignore 13B
.editorconfig 236B
.gitattributes 19B
共 12 条
- 1
资源评论
weixin_42135073
- 粉丝: 28
- 资源: 4783
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功