Skip to content

Instantly share code, notes, and snippets.



Created Jun 16, 2018
What would you like to do?
// Build item details map
// for an O(1) look up for fetched item details
const items = (await getStories(storyIds))
.map(res =>
.filter(item => item !== null)
.reduce((acc, item) => acc.set(, item), new Map())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment