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

subdivisionsByFormerCodefunction

The subdivisions a retired code now stands for, from CLDR's aliases for codes ISO 3166-2 has replaced: FR-A (Alsace) is now FR-GES, and NZ-N (the North Island) is ten regions. The list is in code order.

Import it

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

Definition

function subdivisionsByFormerCode(code: string): readonly Subdivision[]

Parameters

NameTypeDescription
codestring

The retired code, either case: "FR-A", "nz-n".

Returns

readonly Subdivision[]

The successors, frozen: one where the place was renamed or merged into another, several where it was split; an empty list for a code that is not retired, a current code among them.

Examples

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

console.log(subdivisionsByFormerCode("FR-A").map((one) => one.code));    // ["FR-GES"]
console.log(subdivisionsByFormerCode("LU-D").map((one) => one.code));    // ["LU-CL", "LU-DI", "LU-RD", "LU-VD", "LU-WI"]
console.log(subdivisionsByFormerCode("FR-GES"));                         // []
[ 'FR-GES' ]
[ 'LU-CL', 'LU-DI', 'LU-RD', 'LU-VD', 'LU-WI' ]
[]

What it prints (run when this page was built)

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