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_PROVINCESconstant

Every name and other spelling of a Canadian province, to its code: the names and the alternatives together.

Import it

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

Definition

const CA_PROVINCES: Record<string, string> = {
    ...CA_PROVINCE_NAMES,
    ...CA_PROVINCE_ALTERNATIVES,
}

Examples

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

console.log(CA_PROVINCES["nfld"]);
// → "NL"
NL

What it prints (run when this page was built)

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