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"));
// → truetrueWhat it prints (run when this page was built)