Created
May 20, 2017 08:17
-
-
Save joarhal/c86eb9917026e8171efebf8fdd9940c7 to your computer and use it in GitHub Desktop.
Wrapper for es6/es7 async functions for using with express router
This file contains 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
module.exports = 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