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

COMMON_STREET_NAMES_PATTERNconstant

Street names common enough that they must not be taken as part of a city's name.

Import it

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

Definition

const COMMON_STREET_NAMES_PATTERN: RegExp = new RegExp("^(" +
    "broadway|main|first|second|third|fourth|fifth|sixth|seventh|eighth|ninth|tenth|" +
    "market|church|park|oak|elm|pine|maple|cedar|" +
    "washington|lincoln|madison|jefferson|jackson|franklin|harrison|" +
    "central|mill|spring|hill|river|lake|green|" +
    "north|south|east|west" +
    ")$", "i")

Examples

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

console.log(COMMON_STREET_NAMES_PATTERN.test("Main"));
// → 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.