Sports Lib normalizes GPX, TCX, FIT, and service-specific JSON into shared activity and route models. The API reference documents the supported consumer API; implementation adapters and parsers remain available for compatibility but are intentionally outside this reference.
Install the package:
npm install @sports-alliance/sports-lib
When parsing GPX in Node.js, also install a DOM parser implementation:
npm install @xmldom/xmldom
Use the navigation to browse the curated API, including SportsLib, activity parsing options, route parsing options, streams, and the JSON contracts.
analyzeActivityDurability produces deterministic durability evidence when an activity has enough eligible source data. samplePowerCurveAtDuration and comparePowerCurveWindows support power-curve comparisons without extrapolating beyond known samples. Parsing cycling/MTB and running/trail-running activities with recorded power can add DataThreeDimensionalStrainEvidence, a coverage-gated self-fit CP/W′/Pmax result with total and component strain scores. calculateThreeDimensionalStrain remains available for callers with their own model parameters, while calculateThreeDimensionalImpulseResponse applies independently calibrated fitness-fatigue responses to those three load series.