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

FrenchDepartmenttype

A department of France in the tables: its code (75, 2A, 971), its name and its region's, from INSEE's Code officiel géographique.

Import it

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

Also exported from: @johnmorrisdotca/address-plus

Definition

interface FrenchDepartment {
    code: string;
    name: string;
    region: string;
}

Members

NameTypeDescription
codestring
namestring
regionstring

Examples

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

console.log(FR_DEPARTMENTS.find((department) => department.code === "75"));
// → {"code":"75","name":"Paris","region":"Île-de-France"}
{ code: '75', name: 'Paris', region: 'Île-de-France' }

What it prints (run when this page was built)

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