Skip to the content

Kuni国

Look up countries, codes, names and subdivisions, load country data on demand and mount a native country card.

Kuni (国) is Japanese for a country. About the name

Contents

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

NameTypeDescription
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 minPopulation

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kuni 1.19.0.