UNPKG

@gameye/sdk

Version:
25 lines 705 B
/** * Get a list of all teams in the statistic-state. * @param statisticState statistic state */ export function selectTeamList(statisticState) { const teamIndex = statisticState.statistic.team; if (!teamIndex) return []; return Object.values(teamIndex); } /** * Get a single team from the statistic-state. * @param statisticState statistic state * @param teamKey identifier of the team */ export function selectTeamItem(statisticState, teamKey) { const teamIndex = statisticState.statistic.team; if (!teamIndex) return null; const teamItem = teamIndex[teamKey]; if (!teamItem) return null; return teamItem; } //# sourceMappingURL=team.js.map