Reference · French country module
findFrenchDepartmentfunction
Finds a department of France by its code (75, 2A, 971) or its name (Paris, Haute-Corse), without regard to
letter case or accents.
Import it
import { findFrenchDepartment } from "@johnmorrisdotca/address-plus/fr";
Definition
function findFrenchDepartment(text: string): FrenchDepartment | null
Parameters
| Name | Type | Description |
|---|---|---|
text | string | The code or the name. |
Returns
FrenchDepartment | null
The department, or null when nothing matches.
Examples
import { findFrenchDepartment } from "@johnmorrisdotca/address-plus/fr";
console.log(findFrenchDepartment("haute-corse")?.code);
// → "2B"2BWhat it prints (run when this page was built)