没有合适的资源?快使用搜索试试~ 我知道了~
ignor:有条件地忽略异步和promise函数中的错误并返回默认值
共35个文件
js:9个
json:6个
ts:5个
需积分: 10 0 下载量 105 浏览量
2021-02-20
08:52:19
上传
评论
收藏 134KB ZIP 举报
温馨提示
点火器 有条件地忽略异步/承诺函数中的错误,并返回默认值。 概要 import * as ignore from "ignor" ; await got ( url ) . catch ( ignore . code ( "ECONNREFUSED" , "default value" ) ) ; 其他用途 // Ignore an error with a code and return undefined. Otherwise throw error. ignore . code ( "ECONNREFUSED" ) ; // Ignore an error with a code and return default value. ignore . code ( "ECONNREFUSED" , "no content" ) ; // Ignore an error with mul
资源推荐
资源详情
资源评论
收起资源包目录
ignor-master.zip (35个子文件)
ignor-master
README.njk 657B
module-files
configs
.eslintrc.js 3KB
tsconfig.json 6KB
jest.config.js 433B
prettier.config.js 41B
lint-staged.config.js 566B
scripts
tsmod.js 7KB
template-partials
installation 2KB
.gitattributes 765B
.github
workflows
main.yml 2KB
.eslintrc.js 72B
.commitlintrc 53B
.prettierignore 69B
src
types.ts 75B
index.ts 50B
ignore.ts 4KB
ignorer.ts 3KB
.czrc 40B
tsconfig.json 56B
LICENSE 1KB
test
tsconfig.json 135B
index.test.ts 3KB
jest.config.js 109B
README.md 7KB
.husky
commit-msg 78B
pre-commit 69B
prepare-commit-msg 98B
.gitignore 1B
.yo-rc.json 4KB
prettier.config.js 113B
.editorconfig 352B
lint-staged.config.js 116B
.gitignore 6KB
package-lock.json 475KB
package.json 3KB
共 35 条
- 1
资源评论
weixin_42097189
- 粉丝: 38
- 资源: 4567
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功