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

FrenchAddressFieldstype

The fields an address in France fills beside the shared ones. The shared fields keep their meaning: number is the street number, street the name of the street without its type and type the type in full (Rue; the name is de la Paix), secUnitType and secUnitNum an apartment or a door, floorType and floor a floor, building the building's or the residence's name, city the commune, state the department's code and zip the postcode.

Import it

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

Also exported from: @johnmorrisdotca/address-plus

Definition

interface FrenchAddressFields {
    numberExtension?: string;
    staircase?: string;
    entrance?: string;
    lieuDit?: string;
    postalBoxType?: "BP" | "CS" | "TSA";
    postalBoxNum?: string;
    cedex?: string;
    arrondissement?: string;
    careOf?: string;
}

Members

NameTypeDescription
numberExtension (optional)string | undefined
staircase (optional)string | undefined
entrance (optional)string | undefined
lieuDit (optional)string | undefined
postalBoxType (optional)"BP" | "CS" | "TSA" | undefined
postalBoxNum (optional)string | undefined
cedex (optional)string | undefined
arrondissement (optional)string | undefined
careOf (optional)string | undefined

Examples

import { parseFrenchAddress } from "@johnmorrisdotca/address-plus/fr";
import type { FrenchAddressFields } from "@johnmorrisdotca/address-plus/fr";

console.log(parseFrenchAddress("12 bis rue de la Paix, 75002 Paris")?.numberExtension);
// → "bis"
bis

What it prints (run when this page was built)

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