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_DELIMITER_PATTERNconstant

A facility's name followed by a comma or a dash and then the address.

Import it

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

Definition

const FACILITY_DELIMITER_PATTERN: RegExp = /(?:[:;|\u2013\u2014-]|\s{2,})/

Examples

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

console.log(FACILITY_DELIMITER_PATTERN.test("City Hall - 100 Queen St W"));
// → 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.