Created
June 7, 2017 10:13
-
-
Save jillro/d9be91e27568e42731e6505ba291bfb4 to your computer and use it in GitHub Desktop.
A one line wrapper to use async function in express.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const wrap = fn => (...args) => fn(...args).catch(args[2]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment