Reference · Countries and lookup tools
subregionNamefunction
A UN M49 subregion's name, from CLDR.
Import it
import { subregionName } from "@johnmorrisdotca/kuni";
Definition
function subregionName(subregion: string, language?: Language): string | null
Parameters
| Name | Type | Description |
|---|---|---|
subregion | string | Three digits, as |
language (optional) | "en" | "ja" | "en" (the default) or "ja". |
Returns
string | null
The name; null for a code no country is in.
Examples
import { subregionName } from "@johnmorrisdotca/kuni";
console.log(subregionName("030")); // "Eastern Asia"
console.log(subregionName("030", "ja")); // "東アジア"Eastern Asia
東アジアWhat it prints (run when this page was built)