Skip to content

Instantly share code, notes, and snippets.

@davidbarral
Last active January 20, 2018 15:47
Show Gist options
  • Save davidbarral/f4204b349453f8320ad98f5c4dd3ea0a to your computer and use it in GitHub Desktop.
Save davidbarral/f4204b349453f8320ad98f5c4dd3ea0a to your computer and use it in GitHub Desktop.
Promisify: using promisified code
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