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

FrenchCollectivitytype

An overseas collectivity of France in the tables: its code (987), the ISO 3166-1 country code an address in it reads as (PF) and its name.

Import it

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

Also exported from: @johnmorrisdotca/address-plus

Definition

interface FrenchCollectivity {
    code: string;
    country: FrenchPostalCountry;
    name: string;
}

Members

NameTypeDescription
codestring
countryFrenchPostalCountry
namestring

Examples

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

console.log(FR_COLLECTIVITIES.find((one) => one.code === "988"));
// → {"code":"988","country":"NC","name":"Nouvelle-Calédonie"}
{ code: '988', country: 'NC', name: 'Nouvelle-Calédonie' }

What it prints (run when this page was built)

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