Reference · Browser table and SVG
continentNameInfunction
A continent's name in a table of strings, by its key ("northAmerica", "asia"…).
Import it
import { continentNameIn } from "@johnmorrisdotca/tenka/ui";
Also exported from: @johnmorrisdotca/tenka
Definition
function continentNameIn(strings: TenkaStrings, key: string): string
Parameters
| Name | Type | Description |
|---|---|---|
strings | TenkaStrings | The localized words used to format names or the record. |
key | string | The continent identifier, or null to show the whole map. |
Returns
string
A continent's name in a table of strings, by its key ("northAmerica", "asia"…).
Examples
import { TENKA_STRINGS, continentNameIn } from "@johnmorrisdotca/tenka/ui";
console.log(continentNameIn(TENKA_STRINGS.en,"europe"));EuropeWhat it prints (run when this page was built)