Skip to content

Instantly share code, notes, and snippets.

@Xedii
Created December 28, 2018 13:11
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 Xedii/5c0c8e5e39d79e26f399a20fb658aa0d to your computer and use it in GitHub Desktop.
Save Xedii/5c0c8e5e39d79e26f399a20fb658aa0d to your computer and use it in GitHub Desktop.
const makeRequest = async () => {
try {
const res = await requestMock();
return res.data.arr.map(test => test + 2);
} catch (err) {
console.log(err)
}
}
makeRequest().then(res => {
// do something
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment