Reference · The globe as an SVG string
CountryPropstype
What one country's outline carries: its English and Japanese name and its ISO alpha-2 code, all from kuni.
Import it
import type { CountryProps } from "@johnmorrisdotca/chikyu-earth";
Definition
interface CountryProps {
name: string;
ja: string | null;
alpha2: string | null;
}
Members
| Name | Type | Description |
|---|---|---|
name | string | English name, from kuni (Natural Earth's own name where kuni has no entry). |
ja | string | null | Japanese name, from kuni, or null. |
alpha2 | string | null | ISO 3166-1 alpha-2 code, from kuni, or null where there is no code. |
Examples
import { countryList, type CountryProps } from "@johnmorrisdotca/chikyu-earth";
const first: CountryProps | undefined = countryList()[0];
console.log(first?.name, first?.alpha2);Fiji FJWhat it prints (run when this page was built)