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 · German country module

DE_COUNTRY_NAMESconstant

What a country at the end of an address may be called, in capitals with no umlauts: DEUTSCHLAND, GERMANY, ALLEMAGNE, BRD.

Import it

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

Definition

const DE_COUNTRY_NAMES: readonly string[] = [
    "BUNDESREPUBLIK DEUTSCHLAND",
    "FEDERAL REPUBLIC OF GERMANY",
    "DEUTSCHLAND",
    "GERMANY",
    "ALLEMAGNE",
    "ALEMANIA",
    "GERMANIA",
    "BRD",
]

Examples

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

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