Created
December 14, 2017 17:59
-
-
Save maxkorp/73aa92ba0d1fc7bd0d32f1c2248fd5c4 to your computer and use it in GitHub Desktop.
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
export async function doStuff(input) { | |
try { | |
const otherstuff = await doOtherStuff(input); | |
return doDifferentStuff(otherstuff); | |
} catch (e) { | |
//handle | |
} | |
} | |
export async function doStuff2(input) { | |
return Promise.resolve() | |
.then(() => { | |
const otherstuff = await doOtherStuff(input); | |
return doDifferentStuff(otherstuff); | |
}) | |
.catch((e) => { | |
//handle | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment