Reference · Browser table and SVG
territoryNameInfunction
A territory's name in a table of strings, by its key (TENKA_TERRITORIES[n].key, such as "alaska"); "" for a key that is no territory's.
Import it
import { territoryNameIn } from "@johnmorrisdotca/tenka/ui";
Also exported from: @johnmorrisdotca/tenka
Definition
function territoryNameIn(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 territory's name in a table of strings, by its key (TENKA_TERRITORIES[n].key, such as "alaska"); "" for a key that is no territory's.
Examples
import { TENKA_STRINGS, territoryNameIn } from "@johnmorrisdotca/tenka/ui";
console.log(territoryNameIn(TENKA_STRINGS.en,"alaska"));AlaskaWhat it prints (run when this page was built)