@mailwoman/codex 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/ca/index.d.ts +12 -0
- package/out/ca/index.d.ts.map +1 -0
- package/out/ca/index.js +12 -0
- package/out/ca/index.js.map +1 -0
- package/out/ca/postal-code.d.ts +74 -0
- package/out/ca/postal-code.d.ts.map +1 -0
- package/out/ca/postal-code.js +100 -0
- package/out/ca/postal-code.js.map +1 -0
- package/out/ca/province.d.ts +114 -0
- package/out/ca/province.d.ts.map +1 -0
- package/out/ca/province.js +79 -0
- package/out/ca/province.js.map +1 -0
- package/out/ca/street-type.d.ts +57 -0
- package/out/ca/street-type.d.ts.map +1 -0
- package/out/ca/street-type.js +156 -0
- package/out/ca/street-type.js.map +1 -0
- package/out/de/bundesland.d.ts +124 -0
- package/out/de/bundesland.d.ts.map +1 -0
- package/out/de/bundesland.js +81 -0
- package/out/de/bundesland.js.map +1 -0
- package/out/de/index.d.ts +12 -0
- package/out/de/index.d.ts.map +1 -0
- package/out/de/index.js +12 -0
- package/out/de/index.js.map +1 -0
- package/out/de/postleitzahl.d.ts +108 -0
- package/out/de/postleitzahl.d.ts.map +1 -0
- package/out/de/postleitzahl.js +63 -0
- package/out/de/postleitzahl.js.map +1 -0
- package/out/de/street-type.d.ts +58 -0
- package/out/de/street-type.d.ts.map +1 -0
- package/out/de/street-type.js +79 -0
- package/out/de/street-type.js.map +1 -0
- package/out/fr/code-postal.d.ts +68 -0
- package/out/fr/code-postal.d.ts.map +1 -0
- package/out/fr/code-postal.js +84 -0
- package/out/fr/code-postal.js.map +1 -0
- package/out/fr/departement.d.ts +538 -0
- package/out/fr/departement.d.ts.map +1 -0
- package/out/fr/departement.js +127 -0
- package/out/fr/departement.js.map +1 -0
- package/out/fr/index.d.ts +13 -0
- package/out/fr/index.d.ts.map +1 -0
- package/out/fr/index.js +13 -0
- package/out/fr/index.js.map +1 -0
- package/out/fr/region.d.ts +113 -0
- package/out/fr/region.d.ts.map +1 -0
- package/out/fr/region.js +76 -0
- package/out/fr/region.js.map +1 -0
- package/out/fr/voie.d.ts +64 -0
- package/out/fr/voie.d.ts.map +1 -0
- package/out/fr/voie.js +88 -0
- package/out/fr/voie.js.map +1 -0
- package/out/gb/country.d.ts +51 -0
- package/out/gb/country.d.ts.map +1 -0
- package/out/gb/country.js +56 -0
- package/out/gb/country.js.map +1 -0
- package/out/gb/index.d.ts +14 -0
- package/out/gb/index.d.ts.map +1 -0
- package/out/gb/index.js +14 -0
- package/out/gb/index.js.map +1 -0
- package/out/gb/postcode-area.d.ts +46 -0
- package/out/gb/postcode-area.d.ts.map +1 -0
- package/out/gb/postcode-area.js +101 -0
- package/out/gb/postcode-area.js.map +1 -0
- package/out/gb/postcode.d.ts +73 -0
- package/out/gb/postcode.d.ts.map +1 -0
- package/out/gb/postcode.js +88 -0
- package/out/gb/postcode.js.map +1 -0
- package/out/gb/street-type.d.ts +36 -0
- package/out/gb/street-type.d.ts.map +1 -0
- package/out/gb/street-type.js +86 -0
- package/out/gb/street-type.js.map +1 -0
- package/out/index.d.ts +27 -0
- package/out/index.d.ts.map +1 -0
- package/out/index.js +27 -0
- package/out/index.js.map +1 -0
- package/out/jp/address-unit.d.ts +72 -0
- package/out/jp/address-unit.d.ts.map +1 -0
- package/out/jp/address-unit.js +78 -0
- package/out/jp/address-unit.js.map +1 -0
- package/out/jp/index.d.ts +13 -0
- package/out/jp/index.d.ts.map +1 -0
- package/out/jp/index.js +13 -0
- package/out/jp/index.js.map +1 -0
- package/out/jp/postal-code.d.ts +63 -0
- package/out/jp/postal-code.d.ts.map +1 -0
- package/out/jp/postal-code.js +77 -0
- package/out/jp/postal-code.js.map +1 -0
- package/out/jp/prefecture.d.ts +347 -0
- package/out/jp/prefecture.d.ts.map +1 -0
- package/out/jp/prefecture.js +147 -0
- package/out/jp/prefecture.js.map +1 -0
- package/out/postcode-systems.d.ts +31 -0
- package/out/postcode-systems.d.ts.map +1 -0
- package/out/postcode-systems.js +58 -0
- package/out/postcode-systems.js.map +1 -0
- package/out/us/index.d.ts +12 -0
- package/out/us/index.d.ts.map +1 -0
- package/out/us/index.js +12 -0
- package/out/us/index.js.map +1 -0
- package/out/us/state.d.ts +26 -0
- package/out/us/state.d.ts.map +1 -0
- package/out/us/state.js +84 -0
- package/out/us/state.js.map +1 -0
- package/out/us/street-suffix.d.ts +499 -0
- package/out/us/street-suffix.d.ts.map +1 -0
- package/out/us/street-suffix.js +313 -0
- package/out/us/street-suffix.js.map +1 -0
- package/out/us/zipcode.d.ts +184 -0
- package/out/us/zipcode.d.ts.map +1 -0
- package/out/us/zipcode.js +127 -0
- package/out/us/zipcode.js.map +1 -0
- package/package.json +34 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* French postal codes (code postal): the branded type, the shape, normalization, and the
|
|
7
|
+
* first-two-digits → département mapping — the cleanest postcode→admin prior of the three
|
|
8
|
+
* systems.
|
|
9
|
+
*
|
|
10
|
+
* The informative contrast across `us/zipcode.ts`, `de/postleitzahl.ts`, and here:
|
|
11
|
+
*
|
|
12
|
+
* - A US ZIP's first digit maps to a loose BAND of states.
|
|
13
|
+
* - A German PLZ's first digit maps to a Leitzone that CROSSES Bundesland borders.
|
|
14
|
+
* - A French code postal's first TWO digits ARE the département number directly (`75008` → 75, Paris;
|
|
15
|
+
* `13001` → 13, Bouches-du-Rhône). So the French prefix pins the actual admin unit, and the
|
|
16
|
+
* région follows from the département. It is the tightest of the three.
|
|
17
|
+
*
|
|
18
|
+
* The exceptions are the interesting part: Corsica shares prefix `20` across two départements (`2A`
|
|
19
|
+
* Corse-du-Sud / `2B` Haute-Corse, resolved by the rest of the code), and the overseas DOM use a
|
|
20
|
+
* THREE-digit prefix (`971`–`976`). `departementOfCodePostal` handles both. Two further
|
|
21
|
+
* real-world caveats it does NOT try to model: a handful of communes sit under a neighbouring
|
|
22
|
+
* département's code (e.g. some `05`/`04` border villages), and a CEDEX code can carry a
|
|
23
|
+
* large-volume-mail prefix that differs from the geographic one — both rare enough to leave to
|
|
24
|
+
* the gazetteer.
|
|
25
|
+
*/
|
|
26
|
+
import { departementInfo } from "./departement.js";
|
|
27
|
+
import { FR_REGIONS } from "./region.js";
|
|
28
|
+
/** The code-postal shape: exactly five digits. */
|
|
29
|
+
export const CODE_POSTAL_PATTERN = /^\d{5}$/;
|
|
30
|
+
/**
|
|
31
|
+
* Normalize a code-postal surface form to the bare five digits: strip an `F-` country courtesy
|
|
32
|
+
* prefix and surrounding whitespace (`F-75008` → `75008`). Returns null if the result is not five
|
|
33
|
+
* digits.
|
|
34
|
+
*/
|
|
35
|
+
export function normalizeCodePostal(raw) {
|
|
36
|
+
if (typeof raw !== "string")
|
|
37
|
+
return null;
|
|
38
|
+
const s = raw.trim().toUpperCase().replace(/^F-/, "");
|
|
39
|
+
return CODE_POSTAL_PATTERN.test(s) ? s : null;
|
|
40
|
+
}
|
|
41
|
+
/** Type-predicate for a (normalized) French postal code. */
|
|
42
|
+
export function isCodePostal(input) {
|
|
43
|
+
return typeof input === "string" && CODE_POSTAL_PATTERN.test(input);
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The département code a postal code belongs to. The clean rule plus its two exceptions:
|
|
47
|
+
*
|
|
48
|
+
* - `20xxx` → Corsica. The split is by the rest of the code: roughly `20000`–`20199` → `2A` (Ajaccio
|
|
49
|
+
* side), `20200`+ → `2B` (Bastia side). Approximate at the boundary, exact for the bulk.
|
|
50
|
+
* - `970`–`976`xx → an overseas DOM, keyed by the three-digit prefix (`971`–`974`, `976`).
|
|
51
|
+
* - Otherwise the first two digits are the département number.
|
|
52
|
+
*
|
|
53
|
+
* Returns null for a prefix with no département (e.g. `975`/`977`/`98x` collectivities, or a
|
|
54
|
+
* malformed code).
|
|
55
|
+
*/
|
|
56
|
+
export function departementOfCodePostal(codePostal) {
|
|
57
|
+
const cp = normalizeCodePostal(codePostal);
|
|
58
|
+
if (!cp)
|
|
59
|
+
return null;
|
|
60
|
+
if (cp.startsWith("20")) {
|
|
61
|
+
// Corsica: prefix 20 covers both départements; the numeric value splits them.
|
|
62
|
+
return Number(cp) < 20200 ? "2A" : "2B";
|
|
63
|
+
}
|
|
64
|
+
if (cp.startsWith("97") || cp.startsWith("98")) {
|
|
65
|
+
// Overseas: three-digit prefix. Only the five DOM are départements.
|
|
66
|
+
const dom = cp.slice(0, 3);
|
|
67
|
+
return departementInfo(dom) ? dom : null;
|
|
68
|
+
}
|
|
69
|
+
const dd = cp.slice(0, 2);
|
|
70
|
+
return departementInfo(dd) ? dd : null;
|
|
71
|
+
}
|
|
72
|
+
/** The full département record a postal code resolves to (name + région), or null. */
|
|
73
|
+
export function departementForCodePostal(codePostal) {
|
|
74
|
+
return departementInfo(departementOfCodePostal(codePostal));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The région a postal code resolves to, via its département; null if the code maps to no
|
|
78
|
+
* département.
|
|
79
|
+
*/
|
|
80
|
+
export function regionForCodePostal(codePostal) {
|
|
81
|
+
const dep = departementForCodePostal(codePostal);
|
|
82
|
+
return dep ? FR_REGIONS[dep.region] : null;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=code-postal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-postal.js","sourceRoot":"","sources":["../../fr/code-postal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAGH,OAAO,EAAE,eAAe,EAA8C,MAAM,kBAAkB,CAAA;AAC9F,OAAO,EAAE,UAAU,EAAyB,MAAM,aAAa,CAAA;AAa/D,kDAAkD;AAClD,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAA;AAE5C;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CAAC,GAAY;IAC/C,IAAI,OAAO,GAAG,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IACxC,MAAM,CAAC,GAAG,GAAG,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;IACrD,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAE,CAAgB,CAAC,CAAC,CAAC,IAAI,CAAA;AAC9D,CAAC;AAED,4DAA4D;AAC5D,MAAM,UAAU,YAAY,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;AACpE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,uBAAuB,CAAC,UAAmB;IAC1D,MAAM,EAAE,GAAG,mBAAmB,CAAC,UAAU,CAAC,CAAA;IAC1C,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAA;IAEpB,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QACzB,8EAA8E;QAC9E,OAAO,MAAM,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAA;IACxC,CAAC;IACD,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,oEAAoE;QACpE,MAAM,GAAG,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;QAC1B,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,CAAE,GAAuB,CAAC,CAAC,CAAC,IAAI,CAAA;IAC9D,CAAC;IACD,MAAM,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA;IACzB,OAAO,eAAe,CAAC,EAAE,CAAC,CAAC,CAAC,CAAE,EAAsB,CAAC,CAAC,CAAC,IAAI,CAAA;AAC5D,CAAC;AAED,sFAAsF;AACtF,MAAM,UAAU,wBAAwB,CAAC,UAAmB;IAC3D,OAAO,eAAe,CAAC,uBAAuB,CAAC,UAAU,CAAC,CAAC,CAAA;AAC5D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAmB;IACtD,MAAM,GAAG,GAAG,wBAAwB,CAAC,UAAU,CAAC,CAAA;IAChD,OAAO,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAA;AAC3C,CAAC"}
|
|
@@ -0,0 +1,538 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* The 101 French départements (96 metropolitan including Corsica's 2A/2B, plus the 5 overseas DOM),
|
|
7
|
+
* each mapped to its région.
|
|
8
|
+
*
|
|
9
|
+
* The département is the load-bearing admin unit for French postal geography: a code postal's first
|
|
10
|
+
* two digits ARE the département number (see `code-postal.ts`), and the région is derived from
|
|
11
|
+
* the département. This table is therefore the hinge between `code-postal.ts` and `region.ts`.
|
|
12
|
+
*/
|
|
13
|
+
import type { FrenchRegionCode } from "./region.js";
|
|
14
|
+
/** Per-département record: code (2-digit, or `2A`/`2B`, or 3-digit DOM) + name + its région. */
|
|
15
|
+
export interface DepartementInfo {
|
|
16
|
+
/** Département code: `01`–`95` (metropolitan), `2A`/`2B` (Corsica), or `971`–`976` (overseas). */
|
|
17
|
+
code: string;
|
|
18
|
+
/** French name (e.g. `Bouches-du-Rhône`). */
|
|
19
|
+
name: string;
|
|
20
|
+
/** The ISO 3166-2:FR code of the région this département belongs to. */
|
|
21
|
+
region: FrenchRegionCode;
|
|
22
|
+
}
|
|
23
|
+
/** Département code → info. 96 metropolitan (incl. 2A/2B) + 5 overseas = 101. */
|
|
24
|
+
export declare const FR_DEPARTEMENTS: {
|
|
25
|
+
readonly "01": {
|
|
26
|
+
readonly code: "01";
|
|
27
|
+
readonly name: "Ain";
|
|
28
|
+
readonly region: "ARA";
|
|
29
|
+
};
|
|
30
|
+
readonly "02": {
|
|
31
|
+
readonly code: "02";
|
|
32
|
+
readonly name: "Aisne";
|
|
33
|
+
readonly region: "HDF";
|
|
34
|
+
};
|
|
35
|
+
readonly "03": {
|
|
36
|
+
readonly code: "03";
|
|
37
|
+
readonly name: "Allier";
|
|
38
|
+
readonly region: "ARA";
|
|
39
|
+
};
|
|
40
|
+
readonly "04": {
|
|
41
|
+
readonly code: "04";
|
|
42
|
+
readonly name: "Alpes-de-Haute-Provence";
|
|
43
|
+
readonly region: "PAC";
|
|
44
|
+
};
|
|
45
|
+
readonly "05": {
|
|
46
|
+
readonly code: "05";
|
|
47
|
+
readonly name: "Hautes-Alpes";
|
|
48
|
+
readonly region: "PAC";
|
|
49
|
+
};
|
|
50
|
+
readonly "06": {
|
|
51
|
+
readonly code: "06";
|
|
52
|
+
readonly name: "Alpes-Maritimes";
|
|
53
|
+
readonly region: "PAC";
|
|
54
|
+
};
|
|
55
|
+
readonly "07": {
|
|
56
|
+
readonly code: "07";
|
|
57
|
+
readonly name: "Ardèche";
|
|
58
|
+
readonly region: "ARA";
|
|
59
|
+
};
|
|
60
|
+
readonly "08": {
|
|
61
|
+
readonly code: "08";
|
|
62
|
+
readonly name: "Ardennes";
|
|
63
|
+
readonly region: "GES";
|
|
64
|
+
};
|
|
65
|
+
readonly "09": {
|
|
66
|
+
readonly code: "09";
|
|
67
|
+
readonly name: "Ariège";
|
|
68
|
+
readonly region: "OCC";
|
|
69
|
+
};
|
|
70
|
+
readonly "10": {
|
|
71
|
+
readonly code: "10";
|
|
72
|
+
readonly name: "Aube";
|
|
73
|
+
readonly region: "GES";
|
|
74
|
+
};
|
|
75
|
+
readonly "11": {
|
|
76
|
+
readonly code: "11";
|
|
77
|
+
readonly name: "Aude";
|
|
78
|
+
readonly region: "OCC";
|
|
79
|
+
};
|
|
80
|
+
readonly "12": {
|
|
81
|
+
readonly code: "12";
|
|
82
|
+
readonly name: "Aveyron";
|
|
83
|
+
readonly region: "OCC";
|
|
84
|
+
};
|
|
85
|
+
readonly "13": {
|
|
86
|
+
readonly code: "13";
|
|
87
|
+
readonly name: "Bouches-du-Rhône";
|
|
88
|
+
readonly region: "PAC";
|
|
89
|
+
};
|
|
90
|
+
readonly "14": {
|
|
91
|
+
readonly code: "14";
|
|
92
|
+
readonly name: "Calvados";
|
|
93
|
+
readonly region: "NOR";
|
|
94
|
+
};
|
|
95
|
+
readonly "15": {
|
|
96
|
+
readonly code: "15";
|
|
97
|
+
readonly name: "Cantal";
|
|
98
|
+
readonly region: "ARA";
|
|
99
|
+
};
|
|
100
|
+
readonly "16": {
|
|
101
|
+
readonly code: "16";
|
|
102
|
+
readonly name: "Charente";
|
|
103
|
+
readonly region: "NAQ";
|
|
104
|
+
};
|
|
105
|
+
readonly "17": {
|
|
106
|
+
readonly code: "17";
|
|
107
|
+
readonly name: "Charente-Maritime";
|
|
108
|
+
readonly region: "NAQ";
|
|
109
|
+
};
|
|
110
|
+
readonly "18": {
|
|
111
|
+
readonly code: "18";
|
|
112
|
+
readonly name: "Cher";
|
|
113
|
+
readonly region: "CVL";
|
|
114
|
+
};
|
|
115
|
+
readonly "19": {
|
|
116
|
+
readonly code: "19";
|
|
117
|
+
readonly name: "Corrèze";
|
|
118
|
+
readonly region: "NAQ";
|
|
119
|
+
};
|
|
120
|
+
readonly "2A": {
|
|
121
|
+
readonly code: "2A";
|
|
122
|
+
readonly name: "Corse-du-Sud";
|
|
123
|
+
readonly region: "COR";
|
|
124
|
+
};
|
|
125
|
+
readonly "2B": {
|
|
126
|
+
readonly code: "2B";
|
|
127
|
+
readonly name: "Haute-Corse";
|
|
128
|
+
readonly region: "COR";
|
|
129
|
+
};
|
|
130
|
+
readonly "21": {
|
|
131
|
+
readonly code: "21";
|
|
132
|
+
readonly name: "Côte-d'Or";
|
|
133
|
+
readonly region: "BFC";
|
|
134
|
+
};
|
|
135
|
+
readonly "22": {
|
|
136
|
+
readonly code: "22";
|
|
137
|
+
readonly name: "Côtes-d'Armor";
|
|
138
|
+
readonly region: "BRE";
|
|
139
|
+
};
|
|
140
|
+
readonly "23": {
|
|
141
|
+
readonly code: "23";
|
|
142
|
+
readonly name: "Creuse";
|
|
143
|
+
readonly region: "NAQ";
|
|
144
|
+
};
|
|
145
|
+
readonly "24": {
|
|
146
|
+
readonly code: "24";
|
|
147
|
+
readonly name: "Dordogne";
|
|
148
|
+
readonly region: "NAQ";
|
|
149
|
+
};
|
|
150
|
+
readonly "25": {
|
|
151
|
+
readonly code: "25";
|
|
152
|
+
readonly name: "Doubs";
|
|
153
|
+
readonly region: "BFC";
|
|
154
|
+
};
|
|
155
|
+
readonly "26": {
|
|
156
|
+
readonly code: "26";
|
|
157
|
+
readonly name: "Drôme";
|
|
158
|
+
readonly region: "ARA";
|
|
159
|
+
};
|
|
160
|
+
readonly "27": {
|
|
161
|
+
readonly code: "27";
|
|
162
|
+
readonly name: "Eure";
|
|
163
|
+
readonly region: "NOR";
|
|
164
|
+
};
|
|
165
|
+
readonly "28": {
|
|
166
|
+
readonly code: "28";
|
|
167
|
+
readonly name: "Eure-et-Loir";
|
|
168
|
+
readonly region: "CVL";
|
|
169
|
+
};
|
|
170
|
+
readonly "29": {
|
|
171
|
+
readonly code: "29";
|
|
172
|
+
readonly name: "Finistère";
|
|
173
|
+
readonly region: "BRE";
|
|
174
|
+
};
|
|
175
|
+
readonly "30": {
|
|
176
|
+
readonly code: "30";
|
|
177
|
+
readonly name: "Gard";
|
|
178
|
+
readonly region: "OCC";
|
|
179
|
+
};
|
|
180
|
+
readonly "31": {
|
|
181
|
+
readonly code: "31";
|
|
182
|
+
readonly name: "Haute-Garonne";
|
|
183
|
+
readonly region: "OCC";
|
|
184
|
+
};
|
|
185
|
+
readonly "32": {
|
|
186
|
+
readonly code: "32";
|
|
187
|
+
readonly name: "Gers";
|
|
188
|
+
readonly region: "OCC";
|
|
189
|
+
};
|
|
190
|
+
readonly "33": {
|
|
191
|
+
readonly code: "33";
|
|
192
|
+
readonly name: "Gironde";
|
|
193
|
+
readonly region: "NAQ";
|
|
194
|
+
};
|
|
195
|
+
readonly "34": {
|
|
196
|
+
readonly code: "34";
|
|
197
|
+
readonly name: "Hérault";
|
|
198
|
+
readonly region: "OCC";
|
|
199
|
+
};
|
|
200
|
+
readonly "35": {
|
|
201
|
+
readonly code: "35";
|
|
202
|
+
readonly name: "Ille-et-Vilaine";
|
|
203
|
+
readonly region: "BRE";
|
|
204
|
+
};
|
|
205
|
+
readonly "36": {
|
|
206
|
+
readonly code: "36";
|
|
207
|
+
readonly name: "Indre";
|
|
208
|
+
readonly region: "CVL";
|
|
209
|
+
};
|
|
210
|
+
readonly "37": {
|
|
211
|
+
readonly code: "37";
|
|
212
|
+
readonly name: "Indre-et-Loire";
|
|
213
|
+
readonly region: "CVL";
|
|
214
|
+
};
|
|
215
|
+
readonly "38": {
|
|
216
|
+
readonly code: "38";
|
|
217
|
+
readonly name: "Isère";
|
|
218
|
+
readonly region: "ARA";
|
|
219
|
+
};
|
|
220
|
+
readonly "39": {
|
|
221
|
+
readonly code: "39";
|
|
222
|
+
readonly name: "Jura";
|
|
223
|
+
readonly region: "BFC";
|
|
224
|
+
};
|
|
225
|
+
readonly "40": {
|
|
226
|
+
readonly code: "40";
|
|
227
|
+
readonly name: "Landes";
|
|
228
|
+
readonly region: "NAQ";
|
|
229
|
+
};
|
|
230
|
+
readonly "41": {
|
|
231
|
+
readonly code: "41";
|
|
232
|
+
readonly name: "Loir-et-Cher";
|
|
233
|
+
readonly region: "CVL";
|
|
234
|
+
};
|
|
235
|
+
readonly "42": {
|
|
236
|
+
readonly code: "42";
|
|
237
|
+
readonly name: "Loire";
|
|
238
|
+
readonly region: "ARA";
|
|
239
|
+
};
|
|
240
|
+
readonly "43": {
|
|
241
|
+
readonly code: "43";
|
|
242
|
+
readonly name: "Haute-Loire";
|
|
243
|
+
readonly region: "ARA";
|
|
244
|
+
};
|
|
245
|
+
readonly "44": {
|
|
246
|
+
readonly code: "44";
|
|
247
|
+
readonly name: "Loire-Atlantique";
|
|
248
|
+
readonly region: "PDL";
|
|
249
|
+
};
|
|
250
|
+
readonly "45": {
|
|
251
|
+
readonly code: "45";
|
|
252
|
+
readonly name: "Loiret";
|
|
253
|
+
readonly region: "CVL";
|
|
254
|
+
};
|
|
255
|
+
readonly "46": {
|
|
256
|
+
readonly code: "46";
|
|
257
|
+
readonly name: "Lot";
|
|
258
|
+
readonly region: "OCC";
|
|
259
|
+
};
|
|
260
|
+
readonly "47": {
|
|
261
|
+
readonly code: "47";
|
|
262
|
+
readonly name: "Lot-et-Garonne";
|
|
263
|
+
readonly region: "NAQ";
|
|
264
|
+
};
|
|
265
|
+
readonly "48": {
|
|
266
|
+
readonly code: "48";
|
|
267
|
+
readonly name: "Lozère";
|
|
268
|
+
readonly region: "OCC";
|
|
269
|
+
};
|
|
270
|
+
readonly "49": {
|
|
271
|
+
readonly code: "49";
|
|
272
|
+
readonly name: "Maine-et-Loire";
|
|
273
|
+
readonly region: "PDL";
|
|
274
|
+
};
|
|
275
|
+
readonly "50": {
|
|
276
|
+
readonly code: "50";
|
|
277
|
+
readonly name: "Manche";
|
|
278
|
+
readonly region: "NOR";
|
|
279
|
+
};
|
|
280
|
+
readonly "51": {
|
|
281
|
+
readonly code: "51";
|
|
282
|
+
readonly name: "Marne";
|
|
283
|
+
readonly region: "GES";
|
|
284
|
+
};
|
|
285
|
+
readonly "52": {
|
|
286
|
+
readonly code: "52";
|
|
287
|
+
readonly name: "Haute-Marne";
|
|
288
|
+
readonly region: "GES";
|
|
289
|
+
};
|
|
290
|
+
readonly "53": {
|
|
291
|
+
readonly code: "53";
|
|
292
|
+
readonly name: "Mayenne";
|
|
293
|
+
readonly region: "PDL";
|
|
294
|
+
};
|
|
295
|
+
readonly "54": {
|
|
296
|
+
readonly code: "54";
|
|
297
|
+
readonly name: "Meurthe-et-Moselle";
|
|
298
|
+
readonly region: "GES";
|
|
299
|
+
};
|
|
300
|
+
readonly "55": {
|
|
301
|
+
readonly code: "55";
|
|
302
|
+
readonly name: "Meuse";
|
|
303
|
+
readonly region: "GES";
|
|
304
|
+
};
|
|
305
|
+
readonly "56": {
|
|
306
|
+
readonly code: "56";
|
|
307
|
+
readonly name: "Morbihan";
|
|
308
|
+
readonly region: "BRE";
|
|
309
|
+
};
|
|
310
|
+
readonly "57": {
|
|
311
|
+
readonly code: "57";
|
|
312
|
+
readonly name: "Moselle";
|
|
313
|
+
readonly region: "GES";
|
|
314
|
+
};
|
|
315
|
+
readonly "58": {
|
|
316
|
+
readonly code: "58";
|
|
317
|
+
readonly name: "Nièvre";
|
|
318
|
+
readonly region: "BFC";
|
|
319
|
+
};
|
|
320
|
+
readonly "59": {
|
|
321
|
+
readonly code: "59";
|
|
322
|
+
readonly name: "Nord";
|
|
323
|
+
readonly region: "HDF";
|
|
324
|
+
};
|
|
325
|
+
readonly "60": {
|
|
326
|
+
readonly code: "60";
|
|
327
|
+
readonly name: "Oise";
|
|
328
|
+
readonly region: "HDF";
|
|
329
|
+
};
|
|
330
|
+
readonly "61": {
|
|
331
|
+
readonly code: "61";
|
|
332
|
+
readonly name: "Orne";
|
|
333
|
+
readonly region: "NOR";
|
|
334
|
+
};
|
|
335
|
+
readonly "62": {
|
|
336
|
+
readonly code: "62";
|
|
337
|
+
readonly name: "Pas-de-Calais";
|
|
338
|
+
readonly region: "HDF";
|
|
339
|
+
};
|
|
340
|
+
readonly "63": {
|
|
341
|
+
readonly code: "63";
|
|
342
|
+
readonly name: "Puy-de-Dôme";
|
|
343
|
+
readonly region: "ARA";
|
|
344
|
+
};
|
|
345
|
+
readonly "64": {
|
|
346
|
+
readonly code: "64";
|
|
347
|
+
readonly name: "Pyrénées-Atlantiques";
|
|
348
|
+
readonly region: "NAQ";
|
|
349
|
+
};
|
|
350
|
+
readonly "65": {
|
|
351
|
+
readonly code: "65";
|
|
352
|
+
readonly name: "Hautes-Pyrénées";
|
|
353
|
+
readonly region: "OCC";
|
|
354
|
+
};
|
|
355
|
+
readonly "66": {
|
|
356
|
+
readonly code: "66";
|
|
357
|
+
readonly name: "Pyrénées-Orientales";
|
|
358
|
+
readonly region: "OCC";
|
|
359
|
+
};
|
|
360
|
+
readonly "67": {
|
|
361
|
+
readonly code: "67";
|
|
362
|
+
readonly name: "Bas-Rhin";
|
|
363
|
+
readonly region: "GES";
|
|
364
|
+
};
|
|
365
|
+
readonly "68": {
|
|
366
|
+
readonly code: "68";
|
|
367
|
+
readonly name: "Haut-Rhin";
|
|
368
|
+
readonly region: "GES";
|
|
369
|
+
};
|
|
370
|
+
readonly "69": {
|
|
371
|
+
readonly code: "69";
|
|
372
|
+
readonly name: "Rhône";
|
|
373
|
+
readonly region: "ARA";
|
|
374
|
+
};
|
|
375
|
+
readonly "70": {
|
|
376
|
+
readonly code: "70";
|
|
377
|
+
readonly name: "Haute-Saône";
|
|
378
|
+
readonly region: "BFC";
|
|
379
|
+
};
|
|
380
|
+
readonly "71": {
|
|
381
|
+
readonly code: "71";
|
|
382
|
+
readonly name: "Saône-et-Loire";
|
|
383
|
+
readonly region: "BFC";
|
|
384
|
+
};
|
|
385
|
+
readonly "72": {
|
|
386
|
+
readonly code: "72";
|
|
387
|
+
readonly name: "Sarthe";
|
|
388
|
+
readonly region: "PDL";
|
|
389
|
+
};
|
|
390
|
+
readonly "73": {
|
|
391
|
+
readonly code: "73";
|
|
392
|
+
readonly name: "Savoie";
|
|
393
|
+
readonly region: "ARA";
|
|
394
|
+
};
|
|
395
|
+
readonly "74": {
|
|
396
|
+
readonly code: "74";
|
|
397
|
+
readonly name: "Haute-Savoie";
|
|
398
|
+
readonly region: "ARA";
|
|
399
|
+
};
|
|
400
|
+
readonly "75": {
|
|
401
|
+
readonly code: "75";
|
|
402
|
+
readonly name: "Paris";
|
|
403
|
+
readonly region: "IDF";
|
|
404
|
+
};
|
|
405
|
+
readonly "76": {
|
|
406
|
+
readonly code: "76";
|
|
407
|
+
readonly name: "Seine-Maritime";
|
|
408
|
+
readonly region: "NOR";
|
|
409
|
+
};
|
|
410
|
+
readonly "77": {
|
|
411
|
+
readonly code: "77";
|
|
412
|
+
readonly name: "Seine-et-Marne";
|
|
413
|
+
readonly region: "IDF";
|
|
414
|
+
};
|
|
415
|
+
readonly "78": {
|
|
416
|
+
readonly code: "78";
|
|
417
|
+
readonly name: "Yvelines";
|
|
418
|
+
readonly region: "IDF";
|
|
419
|
+
};
|
|
420
|
+
readonly "79": {
|
|
421
|
+
readonly code: "79";
|
|
422
|
+
readonly name: "Deux-Sèvres";
|
|
423
|
+
readonly region: "NAQ";
|
|
424
|
+
};
|
|
425
|
+
readonly "80": {
|
|
426
|
+
readonly code: "80";
|
|
427
|
+
readonly name: "Somme";
|
|
428
|
+
readonly region: "HDF";
|
|
429
|
+
};
|
|
430
|
+
readonly "81": {
|
|
431
|
+
readonly code: "81";
|
|
432
|
+
readonly name: "Tarn";
|
|
433
|
+
readonly region: "OCC";
|
|
434
|
+
};
|
|
435
|
+
readonly "82": {
|
|
436
|
+
readonly code: "82";
|
|
437
|
+
readonly name: "Tarn-et-Garonne";
|
|
438
|
+
readonly region: "OCC";
|
|
439
|
+
};
|
|
440
|
+
readonly "83": {
|
|
441
|
+
readonly code: "83";
|
|
442
|
+
readonly name: "Var";
|
|
443
|
+
readonly region: "PAC";
|
|
444
|
+
};
|
|
445
|
+
readonly "84": {
|
|
446
|
+
readonly code: "84";
|
|
447
|
+
readonly name: "Vaucluse";
|
|
448
|
+
readonly region: "PAC";
|
|
449
|
+
};
|
|
450
|
+
readonly "85": {
|
|
451
|
+
readonly code: "85";
|
|
452
|
+
readonly name: "Vendée";
|
|
453
|
+
readonly region: "PDL";
|
|
454
|
+
};
|
|
455
|
+
readonly "86": {
|
|
456
|
+
readonly code: "86";
|
|
457
|
+
readonly name: "Vienne";
|
|
458
|
+
readonly region: "NAQ";
|
|
459
|
+
};
|
|
460
|
+
readonly "87": {
|
|
461
|
+
readonly code: "87";
|
|
462
|
+
readonly name: "Haute-Vienne";
|
|
463
|
+
readonly region: "NAQ";
|
|
464
|
+
};
|
|
465
|
+
readonly "88": {
|
|
466
|
+
readonly code: "88";
|
|
467
|
+
readonly name: "Vosges";
|
|
468
|
+
readonly region: "GES";
|
|
469
|
+
};
|
|
470
|
+
readonly "89": {
|
|
471
|
+
readonly code: "89";
|
|
472
|
+
readonly name: "Yonne";
|
|
473
|
+
readonly region: "BFC";
|
|
474
|
+
};
|
|
475
|
+
readonly "90": {
|
|
476
|
+
readonly code: "90";
|
|
477
|
+
readonly name: "Territoire de Belfort";
|
|
478
|
+
readonly region: "BFC";
|
|
479
|
+
};
|
|
480
|
+
readonly "91": {
|
|
481
|
+
readonly code: "91";
|
|
482
|
+
readonly name: "Essonne";
|
|
483
|
+
readonly region: "IDF";
|
|
484
|
+
};
|
|
485
|
+
readonly "92": {
|
|
486
|
+
readonly code: "92";
|
|
487
|
+
readonly name: "Hauts-de-Seine";
|
|
488
|
+
readonly region: "IDF";
|
|
489
|
+
};
|
|
490
|
+
readonly "93": {
|
|
491
|
+
readonly code: "93";
|
|
492
|
+
readonly name: "Seine-Saint-Denis";
|
|
493
|
+
readonly region: "IDF";
|
|
494
|
+
};
|
|
495
|
+
readonly "94": {
|
|
496
|
+
readonly code: "94";
|
|
497
|
+
readonly name: "Val-de-Marne";
|
|
498
|
+
readonly region: "IDF";
|
|
499
|
+
};
|
|
500
|
+
readonly "95": {
|
|
501
|
+
readonly code: "95";
|
|
502
|
+
readonly name: "Val-d'Oise";
|
|
503
|
+
readonly region: "IDF";
|
|
504
|
+
};
|
|
505
|
+
readonly "971": {
|
|
506
|
+
readonly code: "971";
|
|
507
|
+
readonly name: "Guadeloupe";
|
|
508
|
+
readonly region: "GUA";
|
|
509
|
+
};
|
|
510
|
+
readonly "972": {
|
|
511
|
+
readonly code: "972";
|
|
512
|
+
readonly name: "Martinique";
|
|
513
|
+
readonly region: "MTQ";
|
|
514
|
+
};
|
|
515
|
+
readonly "973": {
|
|
516
|
+
readonly code: "973";
|
|
517
|
+
readonly name: "Guyane";
|
|
518
|
+
readonly region: "GUF";
|
|
519
|
+
};
|
|
520
|
+
readonly "974": {
|
|
521
|
+
readonly code: "974";
|
|
522
|
+
readonly name: "La Réunion";
|
|
523
|
+
readonly region: "LRE";
|
|
524
|
+
};
|
|
525
|
+
readonly "976": {
|
|
526
|
+
readonly code: "976";
|
|
527
|
+
readonly name: "Mayotte";
|
|
528
|
+
readonly region: "MAY";
|
|
529
|
+
};
|
|
530
|
+
};
|
|
531
|
+
/** A French département code (`01`–`95`, `2A`/`2B`, or `971`–`976`). */
|
|
532
|
+
export type DepartementCode = keyof typeof FR_DEPARTEMENTS;
|
|
533
|
+
/**
|
|
534
|
+
* Look up a département by code (case-insensitive for the Corsica `2A`/`2B` letters); null if
|
|
535
|
+
* unknown.
|
|
536
|
+
*/
|
|
537
|
+
export declare function departementInfo(code: string | null | undefined): DepartementInfo | null;
|
|
538
|
+
//# sourceMappingURL=departement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"departement.d.ts","sourceRoot":"","sources":["../../fr/departement.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,gGAAgG;AAChG,MAAM,WAAW,eAAe;IAC/B,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAA;IACZ,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAA;IACZ,wEAAwE;IACxE,MAAM,EAAE,gBAAgB,CAAA;CACxB;AAED,iFAAiF;AACjF,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsGwB,CAAA;AAEpD,wEAAwE;AACxE,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,eAAe,CAAA;AAE1D;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,IAAI,CAIvF"}
|