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

groupingfunction

One grouping by its id.

Import it

import { grouping } from "@johnmorrisdotca/kuni/groupings";

Definition

function grouping(id: string): Grouping | null

Parameters

NameTypeDescription
idstring

The grouping's id: "eu", "nato", "m49-030", "continent-as", "middle-east", "jp-kanto".

Returns

Grouping | null

The grouping, frozen; null for an id that is not one.

Examples

import { grouping } from "@johnmorrisdotca/kuni/groupings";

console.log(grouping("eu")?.members.length);    // 27
console.log(grouping("eu")?.name.ja);           // "欧州連合"
console.log(grouping("jp-kanto")?.members[5]);  // "JP-13"
console.log(grouping("atlantis"));              // null
27
欧州連合
JP-13
null

What it prints (run when this page was built)

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