Reference · Parsing, formatting and shared types
AddressAbbreviationstype
What getAddressAbbreviations returns: one map per kind of abbreviation.
Import it
import type { AddressAbbreviations } from "@johnmorrisdotca/address-plus";
Definition
interface AddressAbbreviations {
streetTypes: Record<string, string>;
directions: Record<string, string>;
states: Record<string, string>;
provinces: Record<string, string>;
unitTypes: Record<string, string>;
}
Members
| Name | Type | Description |
|---|---|---|
streetTypes | Record<string, string> | |
directions | Record<string, string> | |
states | Record<string, string> | |
provinces | Record<string, string> | |
unitTypes | Record<string, string> |
Examples
import { getAddressAbbreviations } from "@johnmorrisdotca/address-plus";
import type { AddressAbbreviations } from "@johnmorrisdotca/address-plus";
console.log(Object.keys(getAddressAbbreviations()));
// → ["streetTypes","directions","states","provinces","unitTypes"][ 'streetTypes', 'directions', 'states', 'provinces', 'unitTypes' ]What it prints (run when this page was built)