@gameye/sdk
Version:
Node.js SDK for Gameye
29 lines • 850 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
/**
* Get a list of all teams in the statistic-state.
* @param statisticState statistic state
*/
function selectTeamList(statisticState) {
const teamIndex = statisticState.statistic.team;
if (!teamIndex)
return [];
return Object.values(teamIndex);
}
exports.selectTeamList = selectTeamList;
/**
* Get a single team from the statistic-state.
* @param statisticState statistic state
* @param teamKey identifier of the team
*/
function selectTeamItem(statisticState, teamKey) {
const teamIndex = statisticState.statistic.team;
if (!teamIndex)
return null;
const teamItem = teamIndex[teamKey];
if (!teamItem)
return null;
return teamItem;
}
exports.selectTeamItem = selectTeamItem;
//# sourceMappingURL=team.js.map