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

FR_UNIT_TYPESconstant

The types of the part of a building that an address names below the number: an apartment or a door, which the parser reports as secUnitType and secUnitNum, with the abbreviations it reads for each.

Import it

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

Definition

const FR_UNIT_TYPES: Readonly<Record<string, readonly string[]>> = {
    Appartement: ["APPT", "APT", "APP", "APPART"],
    Bureau: ["BUR"],
    Chambre: ["CH", "CHAMB"],
    Local: [],
    Porte: ["PTE"],
    Studio: [],
}

Examples

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

console.log(FR_UNIT_TYPES.Appartement);
// → ["APPT","APT","APP","APPART"]
[ 'APPT', 'APT', 'APP', 'APPART' ]

What it prints (run when this page was built)

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