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

STREET_NAME_ACRONYMSconstant

Acronyms written in capitals inside a street name (US, FBI), from their lower-case form, for capitalizeStreetName.

Import it

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

Definition

const STREET_NAME_ACRONYMS: Map<string, string> = new Map<string, string>([
    ["us", "US"],
    ["fbi", "FBI"],
    ["cia", "CIA"],
    ["epa", "EPA"],
    ["irs", "IRS"],
    ["hud", "HUD"],
    ["fema", "FEMA"],
    ["osha", "OSHA"],
    ["usps", "USPS"],
    ["rcmp", "RCMP"],
    ["cra", "CRA"],
    ["cic", "CIC"],
    ["cbsa", "CBSA"],
    ["cmhc", "CMHC"],
    ["statcan", "StatCan"],
    ["clsc", "CLSC"],
    ["cegep", "CÉGEP"],
    ["rpo", "RPO"],
    ["cn", "CN"],
    ["nasa", "NASA"],
    ["who", "WHO"],
    ["unicef", "UNICEF"],
    ["wwf", "WWF"],
    ["nato", "NATO"],
    ["iso", "ISO"],
    ["aclu", "ACLU"],
    ["aarp", "AARP"],
    ["ymca", "YMCA"],
    ["at&t", "AT&T"],
    ["atnt", "AT&T"],
    ["ibm", "IBM"],
    ["ups", "UPS"],
    ["fedex", "FedEx"],
    ["gm", "GM"],
    ["ge", "GE"],
    ["3m", "3M"],
    ["hrblock", "H&R Block"],
    ["aw", "A&W"],
    ["mlk", "MLK"],
])

Examples

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

console.log(STREET_NAME_ACRONYMS.get("fbi"));
// → "FBI"
FBI

What it prints (run when this page was built)

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