npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

ski-resort-status

v2.2.0

Published

Fetch live ski resort lift and run status data with OpenSkiMap integration

Readme

Ski Resort Status

A real-time ski resort lift and run status library that fetches live data from ski resorts and maps it to OpenSkiMap identifiers.

Access ski resort live lift and run status through a simple API, with data automatically matched to OpenSkiMap IDs for seamless integration with ski mapping applications.

Features

  • TypeScript-first: Full type safety with TypeScript and Zod schema validation
  • Fetch live lift and run status data from ski resorts
  • Automatic matching to OpenSkiMap IDs for standardized lift/run identification
  • Support for multiple ski resort data platforms
  • Comprehensive metadata: opening times, capacity, altitude, grooming status, snow quality
  • Handles duplicate lift/run names with intelligent type-based disambiguation
  • Schema validation: Runtime validation with Zod ensures data consistency across platforms
  • Minimal dependencies - only Zod for validation

Installation

npm install ski-resort-status

Or using the local module:

npm install /path/to/ski-lift-status

Quick Start

JavaScript

const { fetchResortStatus, getSupportedResorts } = require('ski-resort-status');

TypeScript

import { fetchResortStatus, getSupportedResorts, type ResortStatus, type Lift, type Run } from 'ski-resort-status';

// List all supported resorts
const resorts = getSupportedResorts();
console.log(resorts);
// [
//   { id: 'les-trois-vallees', name: 'Les Trois Vallées', openskimap_id: '68b...', platform: 'lumiplan' },
//   ...
// ]

// Fetch live data for a resort
const data = await fetchResortStatus('les-trois-vallees');
console.log(`${data.resort.name}: ${data.lifts.length} lifts, ${data.runs.length} runs`);

// Lifts array
data.lifts.forEach(lift => {
  console.log(`${lift.name}: ${lift.status}`);
  console.log(`  Type: ${lift.liftType}`);
  console.log(`  OpenSkiMap IDs: ${lift.openskimap_ids.join(', ')}`);
  console.log(`  Capacity: ${lift.capacity} persons/hour`);
});

// Runs array
data.runs.forEach(run => {
  console.log(`${run.name}: ${run.status}`);
  console.log(`  Level: ${run.level}`);
  console.log(`  OpenSkiMap IDs: ${run.openskimap_ids.join(', ')}`);
  console.log(`  Grooming: ${run.groomingStatus}`);
});

API Reference

fetchResortStatus(resortIdOrOsmId)

Fetch live status data for a resort.

Parameters:

  • resortIdOrOsmId (string): Resort ID (e.g., 'les-trois-vallees') or OpenSkiMap resort ID (40-char hex string)

Returns: Promise resolving to:

{
  resort: {
    id: string,           // Resort ID
    name: string,         // Resort name
    openskimap_id: string // OpenSkiMap resort ID
  },
  lifts: [
    {
      name: string,              // Lift name
      status: string,            // 'open', 'closed', or 'scheduled'
      liftType: string,          // Platform-specific type (e.g., 'GONDOLA', 'CHAIRLIFT')
      openskimap_ids: string[],  // Matched OpenSkiMap lift IDs

      // Static metadata
      capacity: number,          // Persons per hour
      duration: number,          // Ride duration in minutes
      length: number,            // Length in meters
      uphillCapacity: number,    // Uphill capacity
      speed: number,             // Speed in m/s
      arrivalAltitude: number,   // Top altitude in meters
      departureAltitude: number, // Bottom altitude in meters

      // Real-time data
      openingTimesReal: string,  // Actual opening times
      operating: boolean,        // Currently operating
      openingStatus: string,     // Platform-specific status code
      message: string            // Status message (if any)
    }
  ],
  runs: [
    {
      name: string,              // Run name
      status: string,            // 'open', 'closed', or 'scheduled'
      trailType: string,         // Platform-specific type
      level: string,             // Difficulty level (e.g., 'GREEN', 'BLUE', 'RED', 'BLACK')
      openskimap_ids: string[],  // Matched OpenSkiMap run IDs

      // Static metadata
      length: number,            // Length in meters
      surface: string,           // Surface type
      arrivalAltitude: number,   // Bottom altitude in meters
      departureAltitude: number, // Top altitude in meters
      averageSlope: number,      // Average slope in degrees
      exposure: string,          // Sun exposure
      guaranteedSnow: boolean,   // Snow guarantee

      // Real-time data
      openingTimesReal: string,  // Actual opening times
      operating: boolean,        // Currently operating
      openingStatus: string,     // Platform-specific status code
      groomingStatus: string,    // Grooming status
      snowQuality: string,       // Snow quality
      message: string            // Status message (if any)
    }
  ]
}

getSupportedResorts()

Get list of all supported resorts.

Returns: Array of resort objects:

[
  {
    id: string,           // Resort ID
    name: string,         // Resort name
    openskimap_id: string, // OpenSkiMap resort ID
    platform: string      // Data platform (e.g., 'lumiplan')
  }
]

getResort(resortIdOrOsmId)

Get configuration for a specific resort.

Parameters:

  • resortIdOrOsmId (string): Resort ID or OpenSkiMap resort ID

Returns: Resort configuration object or null if not found

Supported Resorts

Currently supported resorts:

| Resort | Location | OpenSkiMap ID | |--------|----------|---------------| | Les Trois Vallées | France | 68b126bc... | | Espace Diamant | France | 0345d73f... | | Le Grand Domaine | France | 97a14ced... | | Les Sybelles | France | 9bba1f0b... | | Paradiski | France | f47f7e05..., dec537b6... |

More resorts are being added regularly. The module is designed to be easily extensible to support additional platforms and resorts.

OpenSkiMap Integration

All lifts and runs include matched OpenSkiMap IDs for standardized identification:

  • Fuzzy name matching: Handles name variations using Levenshtein distance
  • Intelligent disambiguation: Uses lift type and run difficulty to distinguish between duplicates
  • Multiple matches: Returns arrays of all matching IDs when duplicates exist
  • Type normalization: Automatically converts platform-specific types to OpenSkiMap standards

Adding Support for More Resorts

See CLAUDE.md for developer documentation on:

  • Adding new resorts to existing platforms
  • Implementing new platform fetchers
  • Using the XHR Fetcher tool for API discovery
  • Architecture and design principles

Testing

Run the included test script:

npm test

This fetches live data for Les Trois Vallées and displays summary statistics.

Credits & Data Sources

This project builds on amazing open-source work:

  • OpenSkiMap - Open-source ski map providing comprehensive resort, lift, and run data. All resort/lift/run IDs and reference data come from OpenSkiMap.

  • Liftie (liftie.info) - An excellent open-source ski lift status aggregator with 190+ resorts. This project's architecture is inspired by liftie's platform-based approach. If you need a production-ready lift status service with broader coverage, check out liftie!

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! To add support for new resorts or platforms:

  1. Fork the repository
  2. Follow the architecture guidelines in CLAUDE.md
  3. Add tests for your changes
  4. Submit a pull request

For bug reports or feature requests, please open an issue on GitHub.