Skip to content
laluka

Demo workspace Tidewatch is a made-up tide API. The lessons are real laluka lessons about it. Your own repos arrive with sign-in.

Station ids are case-insensitive

Origin: baselineStatus: confirmedRepo: tidewatch-apiWritten: 19 Sept 2026

What

getStation lower-cases the id before the lookup, so GB-DOVER and gb-dover are the same station. Cache keys use the station's own id, so they do not fragment by case.
Cites

Cites

  1. [1]src/stations.ts:10-12matchSupports: what
    [lines 10-12 of a 12-line file]
    export function getStation(id: string): Station | undefined {
    return STATIONS[id.toLowerCase()];
    }
  2. [2]src/routes.ts:16-16matchSupports: how
    [lines 16-16 of a 16-line file]
    }

Card

Does /v1/stations/GB-Dover/tides work?
mid
Show the answer
Yes. getStation lower-cases the id, and the cache key uses station.id, not the id from the URL.
Cites[1]