ChizuCountry型
リファレンスの説明と例は英語です。見出しと目次は日本語です。
One country in the table of every country: its names, and which of the maps has it.
インポート
import type { ChizuCountry } from "@johnmorrisdotca/chizu";
定義
interface ChizuCountry {
code: string;
iso3: string;
name: string;
nameJa: string;
nameShortJa?: string;
reading?: string;
group: string;
onWorld: boolean;
hasDivisions: boolean;
}
メンバー
| 名前 | 型 | 説明 |
|---|---|---|
code | string | ISO 3166-1 alpha-2, or Natural Earth's own three letters where a territory has none. Lower case in a file's name. |
iso3 | string | |
name | string | |
nameJa | string | |
nameShortJa (省略可) | string | undefined | |
reading (省略可) | string | undefined | |
group | string | The continent. |
onWorld | boolean | Whether the coarse world map draws it (the smallest places are only in the country's own file). |
hasDivisions | boolean | Whether it has a map of its own regions: its provinces, states or departments. |
例
import { CHIZU_COUNTRIES } from "@johnmorrisdotca/chizu/names";
import type { ChizuCountry } from "@johnmorrisdotca/chizu";
const withRegions: ChizuCountry[] = CHIZU_COUNTRIES.filter((country) => country.hasDivisions);
console.log(withRegions.length, withRegions.map((country) => country.code).slice(0, 5).join(" "));
// 32 AR AT AU BE BR32 AR AT AU BE BR出力(このページを作ったときに実行した結果)
この日本語は、まだ日本語を母語とする方の確認を受けていません。訂正を歓迎します。