Skip to the content

address-plusアドレスプラス

Parse, validate, format and compare addresses locally, add country modules and mount an optional native form field.

address-plus extends the parse-address style with typed results, validation, formatting and country modules. About the name

Contents

Reference · Parsing, formatting and shared types

CA_STREET_TYPESconstant

Every street type Canada Post lists, in English and French, with common spellings, in lower case, to the abbreviation the parser reports. Where USPS Publication 28 has the same word, the USPS abbreviation is used (Court is Ct, not Canada Post's Crt; see the conventions in docs/TEST_COVERAGE.md); the words Publication 28 lacks keep Canada Post's abbreviation.

Import it

import { CA_STREET_TYPES } from "@johnmorrisdotca/address-plus";

Definition

const CA_STREET_TYPES: Record<string, string>

Examples

import { CA_STREET_TYPES } from "@johnmorrisdotca/address-plus";

console.log(CA_STREET_TYPES["croissant"]);
// → "crois"
crois

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/address-plus 1.7.0.