Last active
January 20, 2018 15:47
-
-
Save davidbarral/f4204b349453f8320ad98f5c4dd3ea0a to your computer and use it in GitHub Desktop.
Promisify: using promisified code
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
const usefulFunction = async () => { | |
try { | |
const payload = await verifyToken(token); | |
return payload; | |
} catch(e) { | |
console.error("Bad token", e); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment