Reference · Parsing, formatting and shared types
Regiontype
A US state or Canadian province: its code, its country and its name, as normalizeRegion matches them.
Import it
import type { Region } from "@johnmorrisdotca/address-plus";
Definition
type Region = {
abbr: string;
country: "CA" | "US";
name: string;
};
Members
| Name | Type | Description |
|---|---|---|
abbr | string | |
country | "CA" | "US" | |
name | string |
Examples
import { CA_REGIONS } from "@johnmorrisdotca/address-plus";
import type { Region } from "@johnmorrisdotca/address-plus";
console.log(CA_REGIONS[0]);
// → {"abbr":"AB","country":"CA","name":"alberta"}{ abbr: 'AB', country: 'CA', name: 'alberta' }What it prints (run when this page was built)