リファレンス · 印刷できるシート: 色をぬる地球と世界地図、わたしの国、昼と夜、季節
countryFacts関数
リファレンスの説明と例は英語です。見出しと目次は日本語です。
The three facts of a "my country" sheet: the continent it is in, the countries it touches and its capital.
インポート
import { countryFacts } from "@johnmorrisdotca/chikyu-earth/sheets";
定義
function countryFacts(shape: { name: string; ja: string; continent: ContinentId; neighbours: readonly { name: string; ja: string; }[]; }, capital: string | undefined, lang: Lang): string[]
引数
| 名前 | 型 | 説明 |
|---|---|---|
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 |
|
戻り値
string[]
Three sentences.
例
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).出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。