本文へ移動

Kuni国

国、コード、名前、行政区画を調べ、必要なときに国のデータを読み込み、標準の国のカードを表示できます。

「国(くに)」は、国を表す日本語です。 名前について(英語)

目次

リファレンス · すべての行政区画

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[]

引数

名前型説明
codestring

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' ]
[]

出力(このページを作ったときに実行した結果)

ソースを見るGitHub で編集@johnmorrisdotca/kuni 1.19.0 のソースから作成しました。

この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。