本文へ移動

Kuni国

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

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

目次

リファレンス

すべての行政区画

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

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

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

エクスポート

名前種類概要
allSubdivisions関数Every subdivision of every country, every level, in code order.
Level型A level of subdivision: 1 for a country's first division, 2 and 3 for those inside one, or "all".
subdivision関数One subdivision by its ISO 3166-2 code.
Subdivision型A subdivision of a country (a state, a province, a prefecture), with its ISO 3166-2 code, as the lookups hand it out (frozen).
SUBDIVISION_TYPES定数The kinds of subdivision, in kebab case.
subdivisionByName関数The one subdivision a typed name means.
SubdivisionByNameOptions型What subdivisionByName() and subdivisionsByName() may be narrowed to.
subdivisionByShortCode関数One subdivision by its country and the part of its code after the hyphen.
subdivisions関数A country's subdivisions, in code order: the first level unless level asks for another or for "all".
subdivisionsByName関数Every subdivision a typed name could be, in code order: its English or Japanese name, its Japanese name without the word for its kind (オンタリオ, 東京), a prefecture's reading, or its full code.
SubdivisionsOptions型What subdivisions() may be asked.
SubdivisionType型A kind of subdivision, in kebab case: "prefecture", "state", "autonomous-community".
subdivisionTypeLabel関数The word for a kind of subdivision.

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

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