本文へ移動

Kuni国

国、コード、名前、行政区画を調べ、必要なときに国のデータを読み込み、標準の国のカードを表示できます。

「国(くに)」は、国を表す日本語です。 名前について(英語)

目次

リファレンス

場所:大陸の国と検索(サイズはすべての段階を含みます)

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

最小化と gzip 圧縮をしたサイズは 3329.5 kB(読み込むものをすべて含み、esbuild で計測)

リファレンスの説明と例は英語です。見出しと目次は日本語です。

エクスポート

名前種類概要
CityName型A 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).
cityNamesOf関数A 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.
continents関数The seven continents, from kuni's groupings, in the groupings' order: the first choice of a place chooser.
countriesOf関数The countries of a continent, from kuni's groupings (the seven continents), in alpha-2 order.
PlaceContinent型A continent as the groupings name it.
PlaceHit型One result of searchPlaces: a country, or a city.
searchPlaces関数What a person typed, found among countries and cities, best first.
SearchPlacesOptions型What searchPlaces may be asked.

ソースを見るGitHub で編集@johnmorrisdotca/kuni 1.19.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。