Reference · Parsing, formatting and shared types
US_REGIONSconstant
Every name and other spelling of a US state, DC or territory as a Region object, for fuzzy matching by
normalizeRegion.
Import it
import { US_REGIONS } from "@johnmorrisdotca/address-plus";
Definition
const US_REGIONS: Region[] = Object.entries(US_STATES).map(([name, abbr]) => ({
abbr,
country: "US",
name,
}))
Examples
import { US_REGIONS } from "@johnmorrisdotca/address-plus";
console.log(US_REGIONS.find((region) => region.abbr === "WA")?.name);
// → "washington"washingtonWhat it prints (run when this page was built)