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: countries of a continent, and search (the size counts every tier)

CityNametype

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).

Import it

import type { CityName } from "@johnmorrisdotca/kuni/places";

Definition

interface CityName {
    id: string;
    name: {
        en: string;
        ja?: string;
        jaShort?: string;
        jaReading?: string;
        native?: string;
    };
    major: boolean;
}

Members

NameTypeDescription
idstring

The city's id, as City.id.

name{ en: string; ja?: string; jaShort?: string; jaReading?: string; native?: string; }

Its names, as City.name.

majorboolean

True for the country's national capital and its first twenty cities.

Examples

import type { CityName } from "@johnmorrisdotca/kuni/places";

const tokyo: CityName = { id: "Q1490", name: { en: "Tokyo", ja: "東京都", jaShort: "東京" }, major: true };
console.log(tokyo.name.jaShort);
東京

What it prints (run when this page was built)

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