Skip to content
← Public packages

@oerd/yr-weather

Ask MET Norway / yr.no for now-and-tomorrow weather at saved cities.

src/list-locations.ts

16 lines · 486 B · TypeScript
import { loadLocations, type SavedLocation } from './lib.ts'

/**
 * List cities already stored in the yr-weather location lookup map.
 * Use to inspect cached coordinates without geocoding.
 *
 * @returns Saved locations with coordinates
 *
 * @example
 * import listLocations from 'kody:@oerd-at-gripable/yr-weather/listLocations'
 *
 * const places = await listLocations()
 */
export default async function listLocations(): Promise<SavedLocation[]> {
	return await loadLocations()
}