Guest User

Untitled

a guest
Jun 18th, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. // Build item details map
  2. // for an O(1) look up for fetched item details
  3. const items = (await getStories(storyIds))
  4. .map(res => res.data)
  5. .filter(item => item !== null)
  6. .reduce((acc, item) => acc.set(item.id, item), new Map())
Add Comment
Please, Sign In to add comment