首页 开发技术 其它     /    await-to-js:异步await包装器,可轻松处理错误,而无需try-catch-源码

await-to-js:异步await包装器,可轻松处理错误,而无需try-catch-源码

上传者: weixin_42110070 | 上传时间:2024/3/20 19:48:52 | 文件大小:64KB | 文件类型:ZIP
await-to-js:异步await包装器,可轻松处理错误,而无需try-catch-源码
等待js异步等待包装器,可轻松处理错误先决条件您需要使用Node7.6(或更高版本)或ES7编译器,才能使用异步/等待功能。
您可以为此使用babel或打字稿。
安装npmiawait-to-js--save用法importtofrom'await-to-js';//IfyouuseCommonJS(i.eNodeJSenvironment),itshouldbe://constto=require('await-to-js').default;asyncfunctionasyncTaskWithCb(cb){leterr,user,savedTask,notification;[err,user]=awaitto(UserModel.findById 本软件ID:15499586

文件下载

资源详情

[{"title":"(16个子文件64KB)await-to-js:异步await包装器,可轻松处理错误,而无需try-catch-源码","children":[{"title":"await-to-js-master","children":[{"title":".gitignore <span style='color:#111;'>86B</span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'>3.00KB</span>","children":null,"spread":false},{"title":"tslint.json <span style='color:#111;'>93B</span>","children":null,"spread":false},{"title":"package-lock.json <span style='color:#111;'>272.44KB</span>","children":null,"spread":false},{"title":"src","children":[{"title":"await-to-js.ts <span style='color:#111;'>503B</span>","children":null,"spread":false}],"spread":true},{"title":".travis.yml <span style='color:#111;'>319B</span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'>1.05KB</span>","children":null,"spread":false},{"title":"tsconfig.json <span style='color:#111;'>554B</span>","children":null,"spread":false},{"title":"rollup.config.js <span style='color:#111;'>1012B</span>","children":null,"spread":false},{"title":"tools","children":[{"title":"semantic-release-prepare.ts <span style='color:#111;'>1.45KB</span>","children":null,"spread":false},{"title":"gh-pages-publish.ts <span style='color:#111;'>907B</span>","children":null,"spread":false}],"spread":true},{"title":"examples","children":[{"title":"example-1.js <span style='color:#111;'>1.80KB</span>","children":null,"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'>2.32KB</span>","children":null,"spread":false},{"title":".idea","children":[{"title":"vcs.xml <span style='color:#111;'>180B</span>","children":null,"spread":false}],"spread":true},{"title":"test","children":[{"title":"await-to-js.test.ts <span style='color:#111;'>1.23KB</span>","children":null,"spread":false}],"spread":false},{"title":".editorconfig <span style='color:#111;'>211B</span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明