Skip to content

Instantly share code, notes, and snippets.

@inneroot
Last active June 16, 2020 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save inneroot/bde9063d30f12f3249175d70910e620e to your computer and use it in GitHub Desktop.
Save inneroot/bde9063d30f12f3249175d70910e620e to your computer and use it in GitHub Desktop.
return Promise From Promise
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