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

FACILITY_PATTERNSconstant

The patterns that find a facility's name, in English and French.

Import it

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

Definition

const FACILITY_PATTERNS: RegExp[] = [...FACILITY_PATTERNS_EN, ...FACILITY_PATTERNS_FR]

Examples

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

console.log(FACILITY_PATTERNS.some((pattern) => pattern.test("Empire State Building")));
// → 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.