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
| Name | Type | Description |
|---|---|---|
code | string | 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
nullWhat it prints (run when this page was built)