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_UNIT_TYPESconstant

The words for a flat or a room, which the parser reports as secUnitType in full, with the abbreviations it reads for each: Whg. 12 is Wohnung 12.

Import it

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

Definition

const DE_UNIT_TYPES: Readonly<Record<string, readonly string[]>> = {
    Wohnung: ["whg", "wohn", "wo"],
    Appartement: ["app", "apt", "appt"],
    Zimmer: ["zi"],
    Büro: ["bü", "buero"],
    Raum: ["rm"],
}

Examples

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

console.log(DE_UNIT_TYPES.Wohnung);
// → ["whg","wohn","wo"]
[ 'whg', 'wohn', 'wo' ]

What it prints (run when this page was built)

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