exclude lift-assisted ski types from ascent totals

This commit is contained in:
Vincent van der Wal
2026-07-22 16:08:36 +02:00
parent a24eef807c
commit 91775c4099
4 changed files with 28 additions and 6 deletions
+8
View File
@@ -0,0 +1,8 @@
// Lift-assisted downhill types: their recorded elevation gain comes from
// lifts, so it doesn't count toward ascent totals. Touring variants
// ("ski touring", "backcountry ski") earn their metres and do count.
export const LIFT_ASSISTED_TYPES = ['ski', 'alpine ski', 'downhill ski', 'snowboard'];
export function countsTowardAscent(type: string): boolean {
return !LIFT_ASSISTED_TYPES.includes(type.toLowerCase().trim());
}