Reference · Framing, geometry and quiz tools
ChizuCountrytype
One country in the table of every country: its names, and which of the maps has it.
Import it
import type { ChizuCountry } from "@johnmorrisdotca/chizu";
Definition
interface ChizuCountry {
code: string;
iso3: string;
name: string;
nameJa: string;
nameShortJa?: string;
reading?: string;
group: string;
onWorld: boolean;
hasDivisions: boolean;
}
Members
| Name | Type | Description |
|---|---|---|
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 (optional) | string | undefined | |
reading (optional) | 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. |
Examples
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 BRWhat it prints (run when this page was built)