Skip to content

Instantly share code, notes, and snippets.

@dance2die
Created June 16, 2018 13:59
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 dance2die/cb721d594a3c717569499f6239901710 to your computer and use it in GitHub Desktop.
Save dance2die/cb721d594a3c717569499f6239901710 to your computer and use it in GitHub Desktop.
const getItemURL = storyId =>
`https://hacker-news.firebaseio.com/v0/item/${storyId}.json`
const getStories = async storyIds => {
const stories = storyIds.map(storyId => axios.get(getItemURL(storyId)))
return Promise.all(stories)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment