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 · Capital cities

capitalCitiesfunction

The cities of the tier capitals: every capital, of a country or of a subdivision, of any size. 4,283 of them, the most populous first, each a frozen object; the list is made on the first call and shared.

Import it

import { capitalCities } from "@johnmorrisdotca/kuni/cities/capitals";

Definition

function capitalCities(): readonly City[]

Returns

readonly City[]

The list. Join it with other tiers through citySet in

Examples

import { capitalCities } from "@johnmorrisdotca/kuni/cities/capitals";

console.log(capitalCities().length > 0);          // true
console.log(capitalCities()[0].name.en);          // "Tokyo"
console.log(capitalCities()[0].id);               // "Q1490"
console.log(capitalCities()[0].country);          // "JP"
true
Tokyo
Q1490
JP

What it prints (run when this page was built)

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