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_INDICATORSconstant

Words that mark a place's name as a facility (center, tower, hospital, université), in lower case.

Import it

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

Definition

const FACILITY_INDICATORS: readonly ["center", "centre", "building", "tower", "plaza", "square", "garden", "gardens", "park", "university", "college", "school", "hospital", "library", "museum", "station", "airport", "mall", "market", "stadium", "arena", "theater", "theatre", "hotel", "resort", "memorial", "monument", "bridge", "tunnel", "complex"] = [
    "center",
    "centre",
    "building",
    "tower",
    "plaza",
    "square",
    "garden",
    "gardens",
    "park",
    "university",
    "college",
    "school",
    "hospital",
    "library",
    "museum",
    "station",
    "airport",
    "mall",
    "market",
    "stadium",
    "arena",
    "theater",
    "theatre",
    "hotel",
    "resort",
    "memorial",
    "monument",
    "bridge",
    "tunnel",
    "complex",
] as const

Examples

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

console.log(FACILITY_INDICATORS.includes("hospital"));
// → 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.