subdivisionsByFormerCode関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
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 { subdivisionsByFormerCode } from "@johnmorrisdotca/kuni/subdivisions";
定義
function subdivisionsByFormerCode(code: string): readonly Subdivision[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
code | string | The retired code, either case: "FR-A", "nz-n". |
戻り値
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.
例
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' ]
[]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。