UNPKG

trainingpeaks-sdk

Version:
16 lines (15 loc) 650 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isCoachedAthlete = exports.isPremiumAthlete = exports.getAthleteFullName = void 0; const getAthleteFullName = (athlete) => { return `${athlete.firstName} ${athlete.lastName}`.trim(); }; exports.getAthleteFullName = getAthleteFullName; const isPremiumAthlete = (athlete) => { return athlete.premiumTrial || new Date(athlete.expireOn) > new Date(); }; exports.isPremiumAthlete = isPremiumAthlete; const isCoachedAthlete = (athlete) => { return athlete.coachedBy !== null && athlete.coachedBy !== undefined; }; exports.isCoachedAthlete = isCoachedAthlete;