UNPKG

soccer-go

Version:

Soccer CLI for stats and results.

29 lines (28 loc) 704 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Scorer { playerName; teamName; goals; assists; penalties; playedMatches; constructor(data) { this.playerName = data.player.name; this.teamName = data.team.shortName || data.team.name; this.goals = data.goals; this.assists = data.assists; this.penalties = data.penalties; this.playedMatches = data.playedMatches; } toRow = (idx) => [ idx + 1, this.playerName, this.teamName, this.goals, this.assists ?? 0, this.penalties ?? 0, this.playedMatches, ]; } exports.default = Scorer;