Reference · Countries and lookup tools
continentReadingfunction
A continent's Japanese name in hiragana, for sorting in Japanese order as Country.reading does a country: the name
itself where it is written in kana, else its reading (南極, なんきょく). It keeps the long-vowel mark (よーろっぱ), so
sort with a collator for Japanese ("ja"), not by code point.
Import it
import { continentReading } from "@johnmorrisdotca/kuni";
Definition
function continentReading(continent: Continent): string | null
Parameters
| Name | Type | Description |
|---|---|---|
continent | "AF" | "AS" | "NA" | "SA" | "AN" | "EU" | "OC" | One of the seven two-letter continents. |
Returns
string | null
The reading; null for anything that is not one of the seven.
Examples
import { continentReading } from "@johnmorrisdotca/kuni";
console.log(continentReading("AN")); // "なんきょく"
console.log(continentReading("AS")); // "あじあ"なんきょく
あじあWhat it prints (run when this page was built)