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

PROVINCE_EXPANSIONS_ENconstant

Each Canadian province's code in lower case, to its English name in lower case.

Import it

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

Definition

const PROVINCE_EXPANSIONS_EN: Record<string, string> = Object.fromEntries(Object.entries(CA_PROVINCE_NAMES_EN).map(([name, abbr]) => [abbr.toLowerCase(), name]))

Examples

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

console.log(PROVINCE_EXPANSIONS_EN["qc"]);
// → "quebec"
quebec

What it prints (run when this page was built)

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