trainingpeaks-sdk
Version:
TypeScript SDK for TrainingPeaks API integration
10 lines (9 loc) • 364 B
JavaScript
export const getAthleteFullName = (athlete) => {
return `${athlete.firstName} ${athlete.lastName}`.trim();
};
export const isPremiumAthlete = (athlete) => {
return athlete.premiumTrial || new Date(athlete.expireOn) > new Date();
};
export const isCoachedAthlete = (athlete) => {
return athlete.coachedBy !== null && athlete.coachedBy !== undefined;
};