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[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
code | string | 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' ]
[]出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。