-
-
Save kepta/453b4f9833f8513463962ae57e696da9 to your computer and use it in GitHub Desktop.
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
function yourFunc() { | |
const yourAwesomeProm = makeMeProm(); | |
yourEvilUncle(yourAwesomeProm); // rest assured you promise will work, regardless of how evil uncle consumes your promise | |
return yourAwesomeProm.then(r => importantProcessing(r)); | |
} | |
function yourEvilUncle(prom) { | |
return prom.then(r => Promise.reject("destroy!!")); // your evil uncle | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment