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_COLLECTIVITIESconstant

The overseas collectivities that have postcodes in La Poste's base: each with its code, its ISO 3166-1 country code and its name. They are French, and addressed through La Poste, but each has a country code of its own and the Universal Postal Union lists them apart, so an address in one reads as that country's. From INSEE's Code officiel géographique (Licence Ouverte 2.0).

Import it

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

Definition

const FR_COLLECTIVITIES: readonly FrenchCollectivity[] = [
    {
        "code": "975",
        "country": "PM",
        "name": "Saint-Pierre-et-Miquelon"
    },
    {
        "code": "977",
        "country": "BL",
        "name": "Saint-Barthélemy"
    },
    {
        "code": "978",
        "country": "MF",
        "name": "Saint-Martin"
    },
    {
        "code": "986",
        "country": "WF",
        "name": "Wallis-et-Futuna"
    },
    {
        "code": "987",
        "country": "PF",
        "name": "Polynésie française"
    },
    {
        "code": "988",
        "country": "NC",
        "name": "Nouvelle-Calédonie"
    }
]

Examples

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

console.log(FR_COLLECTIVITIES.map((one) => one.country));
// → ["PM","BL","MF","WF","PF","NC"]
[ 'PM', 'BL', 'MF', 'WF', 'PF', 'NC' ]

What it prints (run when this page was built)

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