本文へ移動

Kuni国

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

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

目次

リファレンス · 廃止された国のコード

withdrawn関数

リファレンスの説明と例は英語です。見出しと目次は日本語です。

The withdrawn countries that held a code: the four-letter ISO 3166-3 code ("SUHH"), an alpha-2 ("SU"), an alpha-3 ("SUN") or a numeric code ("810"), in either case. A code can name more than one: "CS" was Czechoslovakia (CSHH) and then Serbia and Montenegro (CSXX), later first; and "BY" is a withdrawn country as well as a current one, which country("BY") answers on its own.

インポート

import { withdrawn } from "@johnmorrisdotca/kuni/withdrawn";

定義

function withdrawn(code: string): readonly WithdrawnCountry[]

引数

名前型説明
codestring

Any code a withdrawn country held.

戻り値

readonly WithdrawnCountry[]

The matching records, the one that was withdrawn last first; an empty list for anything else, and for the code of a current country that was never withdrawn.

例

import { withdrawn } from "@johnmorrisdotca/kuni/withdrawn";

console.log(withdrawn("su")[0].name.en);        // "Soviet Union"
console.log(withdrawn("SU")[0].until);          // "1992"
console.log(withdrawn("YUCS")[0].successors);   // ["CS"]: itself withdrawn, and resolved by withdrawn("CS")
console.log(withdrawn("CS").map((one) => one.code)); // ["CSXX", "CSHH"]
console.log(withdrawn("JP"));                   // []
Soviet Union
1992
[ 'CS' ]
[ 'CSXX', 'CSHH' ]
[]

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

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

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