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 · All subdivisions

subdivisionByFormerCodefunction

The one subdivision a retired code now stands for.

Import it

import { subdivisionByFormerCode } from "@johnmorrisdotca/kuni/subdivisions";

Definition

function subdivisionByFormerCode(code: string): Subdivision | null

Parameters

NameTypeDescription
codestring

The retired code, either case: "FR-A", "pl-ds".

Returns

Subdivision | null

The subdivision, frozen; null when the code is not retired, or when it was split and so has several successors (ask subdivisionsByFormerCode).

Examples

import { subdivisionByFormerCode } from "@johnmorrisdotca/kuni/subdivisions";

console.log(subdivisionByFormerCode("FR-A")?.name.en);   // "Grand-Est"
console.log(subdivisionByFormerCode("LU-D"));            // null (five successors)
Grand-Est
null

What it prints (run when this page was built)

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