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 · Regions and international bodies

Groupingtype

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

Import it

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

Definition

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;
}

Members

NameTypeDescription
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 (optional){ en?: string; ja?: string; } | undefined

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

reading (optional)string | undefined

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

otherNames (optional)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 (optional)string | undefined

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

parent (optional)string | undefined

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

sets (optional)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 (optional)readonly GroupingMember[] | undefined

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

others (optional)readonly GroupingOther[] | undefined

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

definitionstring

The definition the members follow.

note (optional)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".

Examples

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' ]

What it prints (run when this page was built)

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