continentName関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
A continent's name, from CLDR.
インポート
import { continentName } from "@johnmorrisdotca/kuni";
定義
function continentName(continent: Continent, language?: Language): string | null
引数
| 名前 | 型 | 説明 |
|---|---|---|
continent | "AF" | "AS" | "NA" | "SA" | "AN" | "EU" | "OC" | One of the seven two-letter continents. |
language (省略可) | "en" | "ja" | "en" (the default) or "ja". |
戻り値
string | null
The name; null for anything that is not one of the seven.
例
import { continentName } from "@johnmorrisdotca/kuni";
console.log(continentName("AS")); // "Asia"
console.log(continentName("AS", "ja")); // "アジア"Asia
アジア出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。