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
| Name | Type | Description |
|---|---|---|
code | string | 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)