countryFactsfunction
The three facts of a "my country" sheet: the continent it is in, the countries it touches and its capital.
Import it
import { countryFacts } from "@johnmorrisdotca/chikyu-earth/sheets";
Definition
function countryFacts(shape: { name: string; ja: string; continent: ContinentId; neighbours: readonly { name: string; ja: string; }[]; }, capital: string | undefined, lang: Lang): string[]
Parameters
| Name | Type | Description |
|---|---|---|
shape | { name: string; ja: string; continent: ContinentId; neighbours: readonly { name: string; ja: string; }[]; } | The country's name and Japanese name, its continent and the names of its neighbours. |
capital | string | undefined | The capital's name, or |
lang | Lang |
|
Returns
string[]
Three sentences.
Examples
import { countryFacts, countryShape } from "@johnmorrisdotca/chikyu-earth/sheets";
const france = countryShape("FR")!;
console.log(countryFacts(france, "Paris", "en")[1]);It touches 6 countries: Belgium, Germany and Italy (and 3 more).What it prints (run when this page was built)