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

WRITTEN_NUMBERSconstant

House numbers written as words (One, Twenty), as one alternation for a regular expression, so One Microsoft Way is read as number 1.

Import it

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

Definition

const WRITTEN_NUMBERS: string = WRITTEN_NUMBERS_EN + "|" + WRITTEN_NUMBERS_FR

Examples

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

console.log(new RegExp("^(?:" + WRITTEN_NUMBERS + ")$", "i").test("one"));
// → true
true

What it prints (run when this page was built)

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