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

Getting started

Getting started

Find a country without loading its subdivisions.

Use the native API

import { country,countryByName,countryName } from "@johnmorrisdotca/kuni";
console.log(country("JP")?.alpha3,countryByName("ドイツ")?.alpha2,countryName("US","ja",{short:true}));
JPN DE アメリカ

The root carries 250 current country codes: the 249 ISO alpha-2 codes and XK for Kosovo. Countries have English/Japanese names, optional local names, codes and basic fields. The root does not load every subdivision table. Core lookups are pure, locale-free and use the stored data without a hosted lookup service.

Choose an entry

/codes provides exact code checks without names. /subdivisions supplies synchronous subdivision lookups; /load loads one country on demand. Facts, subdivision facts, groupings and withdrawn codes have their own entries. The optional card uses the data in a browser. Continue with code handling, subdivisions or the full resource catalogue.

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