本文へ移動

Kuni国

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

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

目次

リファレンス · 地域と国際機関

Grouping型

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

A grouping of countries, or of the subdivisions inside one country.

インポート

import type { Grouping } from "@johnmorrisdotca/kuni/groupings";

定義

interface Grouping {
    id: string;
    kind: GroupingKind;
    name: {
        en: string;
        ja: string;
    };
    shortName?: {
        en?: string;
        ja?: string;
    };
    reading?: string;
    otherNames?: readonly GroupingName[];
    informal: boolean;
    country?: string;
    parent?: string;
    sets?: readonly string[];
    members: readonly string[];
    periods?: readonly GroupingMember[];
    others?: readonly GroupingOther[];
    definition: string;
    note?: string;
    source: GroupingSource;
    asOf: string;
}

メンバー

名前型説明
idstring

A stable id in kebab case: "eu", "m49-030", "continent-as", "jp-kanto".

kind"continent" | "m49" | "membership" | "informal" | "subdivision"

What kind of grouping it is.

name{ en: string; ja: string; }

Its name in English and in Japanese.

shortName (省略可){ en?: string; ja?: string; } | undefined

A short form where one is in use: "EU", "NATO", 国連.

reading (省略可)string | undefined

The Japanese name in hiragana, where it is written with kanji.

otherNames (省略可)readonly GroupingName[] | undefined

Other names it is known by, each in both languages with its reading: Kansai (関西地方) for the Kinki region.

informalboolean

True for a grouping no body defines (the Middle East, Scandinavia), whose members follow the definition given.

country (省略可)string | undefined

For a grouping of subdivisions: the alpha-2 code of the country they are in.

parent (省略可)string | undefined

For a UN M49 area: the id of the area that holds it ("m49-142" for Eastern Asia).

sets (省略可)readonly string[] | undefined

For a grouping of subdivisions: the sets it belongs to. The groupings of one set cover the country once.

membersreadonly string[]

The members now: alpha-2 codes, or ISO 3166-2 codes for a grouping inside a country.

periods (省略可)readonly GroupingMember[] | undefined

For an international body: every period of membership, current and former, with its dates.

others (省略可)readonly GroupingOther[] | undefined

For an international body: countries that stand with it without being members.

definitionstring

The definition the members follow.

note (省略可)string | undefined

Where definitions disagree, or anything else a reader should know.

sourceGroupingSource

Where the list comes from, and its terms.

asOfstring

The day the list was true, "2026-10-09".

例

import type { Grouping } from "@johnmorrisdotca/kuni/groupings";
import { grouping } from "@johnmorrisdotca/kuni/groupings";

const value: Grouping = grouping("eu")!;
console.log(typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[ 'id', 'kind', 'name', 'informal', 'members', 'definition' ]

出力(このページを作ったときに実行した結果)

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

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