Reference · Cities: lookups and loading (the tiers load on demand; the size counts every tier)
NearestOptionstype
What nearest and within may be asked.
Import it
import type { NearestOptions } from "@johnmorrisdotca/kuni/cities";
Definition
interface NearestOptions {
maxKm?: number;
minPopulation?: number;
country?: string;
}
Members
| Name | Type | Description |
|---|---|---|
maxKm (optional) | number | undefined | Ignore cities further than this many kilometres; none by default. |
minPopulation (optional) | number | undefined | Ignore cities of fewer people, and those with no figure; none by default. |
country (optional) | string | undefined | Look only in this country, an ISO 3166-1 alpha-2 code in either case. |
Examples
import type { NearestOptions } from "@johnmorrisdotca/kuni/cities";
const value: NearestOptions = { maxKm: 100, minPopulation: 100000 };
console.log(Object.keys(value).join(" "));maxKm minPopulationWhat it prints (run when this page was built)