15 lines
457 B
TypeScript
15 lines
457 B
TypeScript
// Lift-assisted downhill types: their recorded elevation gain comes from
|
|
// lifts, so it doesn't count toward ascent totals. Touring variants
|
|
// ("skitour", "backcountry ski", "langlauf") earn their metres and do count.
|
|
export const LIFT_ASSISTED_TYPES = [
|
|
'ski',
|
|
'alpine ski',
|
|
'alpineski',
|
|
'downhill ski',
|
|
'snowboard'
|
|
];
|
|
|
|
export function countsTowardAscent(type: string): boolean {
|
|
return !LIFT_ASSISTED_TYPES.includes(type.toLowerCase().trim());
|
|
}
|