Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const api = () => {
  2.   getGameScores = (gameId, rundeId) => {
  3.     const gameName = data.games[gameId].name;
  4.     const scores = data.scores.filter(s => s.game == gameId);
  5.     return scores.map(s => ({
  6.       gameName,
  7.       userScores: s.useScores.map(u => {
  8.         name: data.users[u.user], score;
  9.       })
  10.     }));
  11.   };
  12. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement