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

FRENCH_PREPOSITIONSconstant

French particles that can open a street name, each with the space after it, to the way it is written there (de la as De la ).

Import it

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

Definition

const FRENCH_PREPOSITIONS: Map<string, string> = new Map([
    ["du ", "Du "],
    ["des ", "Des "],
    ["de la ", "De la "],
    ["de l'", "De l'"],
    ["de ", "De "],
])

Examples

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

console.log(FRENCH_PREPOSITIONS.get("de la "));
// → "De la "
De la

What it prints (run when this page was built)

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