Reference · French country module
FrenchPostcodetype
A postcode taken apart: the code of the department or territory its number belongs to, the country it delivers to,
and whether La Poste's base has it. place is a department's code (75, 2A, 971), a collectivity's (987) or
99 for Monaco.
Import it
import type { FrenchPostcode } from "@johnmorrisdotca/address-plus/fr";
Also exported from: @johnmorrisdotca/address-plus
Definition
interface FrenchPostcode {
postcode: string;
place: string;
country: FrenchPostalCountry;
known: boolean;
department?: string;
}
Members
| Name | Type | Description |
|---|---|---|
postcode | string | |
place | string | |
country | FrenchPostalCountry | |
known | boolean | |
department (optional) | string | undefined |
Examples
import { parseFrenchPostcode } from "@johnmorrisdotca/address-plus/fr";
import type { FrenchPostcode } from "@johnmorrisdotca/address-plus/fr";
console.log(parseFrenchPostcode("20200"));
// → {"postcode":"20200","place":"2B","country":"FR","known":true,"department":"2B"}{
postcode: '20200',
place: '2B',
country: 'FR',
known: true,
department: '2B'
}What it prints (run when this page was built)