Skip to the content

Taisen Brackets対戦

Knockout brackets as SVG, from a list of ties.

Taisen (対戦, たいせん) is Japanese for a matchup: two sides facing each other. About the name

Contents

Reference · Where every tie sits

countryNamefunction

The name of a country in a language, from its ISO 3166 code, through Intl.DisplayNames: no list to write ("DE" is Germany, Allemagne, ドイツ, Alemania, Deutschland). The home nations (GB-ENG, GB-SCT, GB-WLS, GB-NIR) are not regions to Intl, so they have names here. A code Intl does not know gives undefined.

Import it

import { countryName } from "@johnmorrisdotca/taisen-brackets/layout";

Also exported from: @johnmorrisdotca/taisen-brackets

Definition

function countryName(code: string, locale?: string | Locale): string | undefined

Parameters

NameTypeDescription
codestring

The country's ISO 3166 code: CA, JP.

locale (optional)string | Locale

The language, as for locale. Default English.

Returns

string | undefined

The name, or undefined when the code is not a country the runtime knows.

Examples

import { countryName } from "@johnmorrisdotca/taisen-brackets";

console.log(countryName("JP", "en"), countryName("JP", "ja"));
Japan 日本

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/taisen-brackets 0.20.0.