Await-catch
Async await wrapper for easy error handling
This library is inspired by Dima Grossman && Tomer Barnea work. For more info about this approach, please check these links
Install
npm i await-catch --save
Usage
With just one promise call:
; { let err user; err user = await ; iferr throw 'Some awesome Error message.'; return user;}
It works with an array of promises too:
; { let err result; err result = await ; if err throw 'Some awesome Error message.'; return result;}
Contributors
License
MIT © Cristian Buffa