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

Places: countries of a continent, and search (the size counts every tier)

import { … } from "@johnmorrisdotca/kuni/places";

3329.5 kB minified and gzipped, with everything it imports (measured with esbuild)

Exports

NameKindWhat it is
CityNametypeA city in a country's light list (@johnmorrisdotca/kuni/cities/names-<code>): its id and names only, for a picker to show before it fetches the rest, and whether it is one of the country's major cities (its capital, or one of its first twenty, ranked by the urban area each heads).
cityNamesOffunctionA country's cities, ids and names only: the light list a picker shows first (a third to a half of the country's full file), in the order of citiesOf, each with major for the country's capital and its first twenty cities.
continentsfunctionThe seven continents, from kuni's groupings, in the groupings' order: the first choice of a place chooser.
countriesOffunctionThe countries of a continent, from kuni's groupings (the seven continents), in alpha-2 order.
PlaceContinenttypeA continent as the groupings name it.
PlaceHittypeOne result of searchPlaces: a country, or a city.
searchPlacesfunctionWhat a person typed, found among countries and cities, best first.
SearchPlacesOptionstypeWhat searchPlaces may be asked.

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