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 outside ISO 3166-1

ReservedPlacetype

A place outside ISO 3166-1, as the lookups hand it out (frozen).

Import it

import type { ReservedPlace } from "@johnmorrisdotca/kuni/reserved";

Definition

interface ReservedPlace {
    id: string;
    code?: string;
    alpha3?: string;
    kind: ReservedKind;
    name: {
        en: string;
        ja: string | null;
    };
    status: "territory" | "disputed" | "uninhabited";
    parent?: string;
    subdivisions: readonly string[];
    until?: string;
    source: {
        name: string;
        url: string;
    };
}

Members

NameTypeDescription
idstring

A name for it in kebab case that does not change: "ascension-island", "somaliland".

code (optional)string | undefined

Its two letters, "AC" or "XA"; absent for a de-facto place, which has none.

alpha3 (optional)string | undefined

The three letters CLDR gives a reserved code, "ASC"; absent where it gives none.

kind"iso-reserved" | "user-assigned" | "de-facto"

Which kind of place it is.

name{ en: string; ja: string | null; }

CLDR's names for a reserved code, Wikidata's labels otherwise; ja is null where the source has none.

status"territory" | "disputed" | "uninhabited"

"territory" or "uninhabited" for a reserved code, which is part of a state; "disputed" for the others.

parent (optional)string | undefined

The alpha-2 code of the member of the United Nations Wikidata names as the country it is in, or as claiming it: "GB" for Ascension Island, "ES" for the Canary Islands. For a user-assigned or de-facto place it is what Wikidata records and says nothing about who governs it. Absent where Wikidata names none.

subdivisionsreadonly string[]

The ISO 3166-2 codes kuni has for the same place: ["SH-AC"], ["ES-CE", "ES-ML"]; empty where there is none.

until (optional)string | undefined

The year Wikidata says it was dissolved, "2023"; absent for a place that still is.

source{ name: string; url: string; }

Where the code, or the place, comes from: a name and an address.

Examples

import type { ReservedPlace } from "@johnmorrisdotca/kuni/reserved";
import { reservedPlace } from "@johnmorrisdotca/kuni/reserved";

const value: ReservedPlace = reservedPlace("IC")!;
console.log(typeof value === "object" ? Object.keys(value).slice(0,6) : value);
[ 'id', 'kind', 'name', 'status', 'subdivisions', 'source' ]

What it prints (run when this page was built)

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