Last active
June 16, 2020 13:23
-
-
Save inneroot/bde9063d30f12f3249175d70910e620e to your computer and use it in GitHub Desktop.
return Promise From Promise
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
const returnPromiseFromPromise = async (decree) => { | |
return new Promise((resolve, reject) => { | |
getPromise() | |
.then(result => resolve(result)) | |
.catch(Error => reject(Error)) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment