Skip to the content

Kuni国

Look up countries, codes, names and subdivisions, load country data on demand and mount a native country card.

Kuni (国) is Japanese for a country. About the name

Contents

Reference · Withdrawn country codes

withdrawnfunction

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 it

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

Definition

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

Parameters

NameTypeDescription
codestring

Any code a withdrawn country held.

Returns

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.

Examples

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

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/kuni 1.4.0.