ThemeParks.wiki Parks API - v2.0.0
    Preparing search index...

    Function createStatusMap

    • Create a status mapping function from a declarative config.

      Parameters

      Returns (status: string) => string

      const mapStatus = createStatusMap({
      OPERATING: ['open', 'opened'],
      DOWN: ['temp closed', 'temp closed due weather'],
      CLOSED: ['closed', 'not scheduled', ''],
      REFURBISHMENT: ['maintenance'],
      }, { parkName: 'SixFlags' });

      mapStatus('open') // → 'OPERATING'
      mapStatus('temp closed') // → 'DOWN'
      mapStatus('weird_thing') // → 'CLOSED' (logs warning)