@mailwoman/codex 4.4.0 → 4.5.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/address-system-conventions.d.ts +2 -2
- package/out/address-system-conventions.js +4 -4
- package/out/au/delivery-service.d.ts +165 -0
- package/out/au/delivery-service.d.ts.map +1 -0
- package/out/au/delivery-service.js +132 -0
- package/out/au/delivery-service.js.map +1 -0
- package/out/au/index.d.ts +15 -0
- package/out/au/index.d.ts.map +1 -0
- package/out/au/index.js +15 -0
- package/out/au/index.js.map +1 -0
- package/out/au/level-designator.d.ts +150 -0
- package/out/au/level-designator.d.ts.map +1 -0
- package/out/au/level-designator.js +156 -0
- package/out/au/level-designator.js.map +1 -0
- package/out/au/postcode.d.ts +40 -0
- package/out/au/postcode.d.ts.map +1 -0
- package/out/au/postcode.js +37 -0
- package/out/au/postcode.js.map +1 -0
- package/out/au/state.d.ts +31 -0
- package/out/au/state.d.ts.map +1 -0
- package/out/au/state.js +31 -0
- package/out/au/state.js.map +1 -0
- package/out/country/country.d.ts +18 -17
- package/out/country/country.d.ts.map +1 -1
- package/out/country/country.js +17 -16
- package/out/country/country.js.map +1 -1
- package/out/country/index.d.ts +1 -1
- package/out/country/index.d.ts.map +1 -1
- package/out/country/index.js +1 -1
- package/out/country/index.js.map +1 -1
- package/out/country/names.d.ts +1 -1
- package/out/country/names.js +1 -1
- package/out/fr/cedex.d.ts +35 -0
- package/out/fr/cedex.d.ts.map +1 -0
- package/out/fr/cedex.js +43 -0
- package/out/fr/cedex.js.map +1 -0
- package/out/fr/index.d.ts +1 -0
- package/out/fr/index.d.ts.map +1 -1
- package/out/fr/index.js +1 -0
- package/out/fr/index.js.map +1 -1
- package/out/index.d.ts +3 -1
- package/out/index.d.ts.map +1 -1
- package/out/index.js +2 -0
- package/out/index.js.map +1 -1
- package/out/nz/delivery-service.d.ts +102 -0
- package/out/nz/delivery-service.d.ts.map +1 -0
- package/out/nz/delivery-service.js +110 -0
- package/out/nz/delivery-service.js.map +1 -0
- package/out/nz/index.d.ts +12 -0
- package/out/nz/index.d.ts.map +1 -0
- package/out/nz/index.js +12 -0
- package/out/nz/index.js.map +1 -0
- package/out/nz/postcode.d.ts +31 -0
- package/out/nz/postcode.d.ts.map +1 -0
- package/out/nz/postcode.js +28 -0
- package/out/nz/postcode.js.map +1 -0
- package/out/postcode-systems.d.ts +1 -1
- package/out/postcode-systems.d.ts.map +1 -1
- package/out/postcode-systems.js +4 -0
- package/out/postcode-systems.js.map +1 -1
- package/out/us/floor-designator.d.ts +104 -0
- package/out/us/floor-designator.d.ts.map +1 -0
- package/out/us/floor-designator.js +84 -0
- package/out/us/floor-designator.js.map +1 -0
- package/out/us/index.d.ts +6 -2
- package/out/us/index.d.ts.map +1 -1
- package/out/us/index.js +6 -2
- package/out/us/index.js.map +1 -1
- package/out/us/military-address.d.ts +143 -0
- package/out/us/military-address.d.ts.map +1 -0
- package/out/us/military-address.js +156 -0
- package/out/us/military-address.js.map +1 -0
- package/out/us/street-directional.d.ts +4 -2
- package/out/us/street-directional.d.ts.map +1 -1
- package/out/us/street-directional.js +4 -2
- package/out/us/street-directional.js.map +1 -1
- package/out/us/zipcode.d.ts +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* USPS Publication 28, Appendix C2 — Floor-class Secondary Unit Designators.
|
|
7
|
+
*
|
|
8
|
+
* The sibling of {@link ./unit-designator.ts}: where the unit table covers the full secondary-unit
|
|
9
|
+
* vocabulary (APT, STE, RM, …), this module extracts the floor-class subset — designators that
|
|
10
|
+
* name a FLOOR or LEVEL of the building rather than a specific addressable unit on that floor.
|
|
11
|
+
* USPS Pub 28 Appendix C2 identifies these designators as requiring a secondary number: "FL" (the
|
|
12
|
+
* approved abbreviation for FLOOR). The publication gives `FLOOR` as the canonical designator
|
|
13
|
+
* with approved abbreviation `FL` and variant `FLR`; `BASEMENT` (`BSMT`), `PENTHOUSE` (`PH`), and
|
|
14
|
+
* `LOBBY` (`LBBY`) are the standalone-or-numbered floor-adjacent types also listed in Appendix
|
|
15
|
+
* C2.
|
|
16
|
+
*
|
|
17
|
+
* Appendix C2 explicitly marks FLOOR, BASEMENT as requiring a secondary number (alongside APT,
|
|
18
|
+
* BLDG, etc.) while PENTHOUSE and LOBBY may stand alone. PH and LBBY are kept here (not just in
|
|
19
|
+
* {@link ./unit-designator.ts}) because the span proposer treats them as level-class hints —
|
|
20
|
+
* "LOBBY" and "PH" name a specific floor-analog, not a numbered unit, and the prior map routes
|
|
21
|
+
* `LEVEL_PHRASE` → `unit` (the schema carries no separate `level` tag).
|
|
22
|
+
*
|
|
23
|
+
* This table drives the `levelDesignators` set in the span-proposer lexicon. The full
|
|
24
|
+
* secondary-unit designators (APT, STE, RM, …) remain in {@link ./unit-designator.ts}.
|
|
25
|
+
*
|
|
26
|
+
* Data is verbatim USPS Pub 28 Appendix C2.
|
|
27
|
+
* @see {@link https://pe.usps.com/text/pub28/28apc_003.htm USPS Publication 28 — Appendix C2: Secondary Unit Designators}
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* USPS Pub 28 C2 floor-class secondary unit designators. Verbatim from the publication; see the
|
|
31
|
+
* module header for the per-row provenance. Ordered with the most-common numbered form first.
|
|
32
|
+
*/
|
|
33
|
+
export const US_FLOOR_DESIGNATORS = [
|
|
34
|
+
{ name: "FLOOR", abbreviation: "FL", variants: ["FLR"], requiresNumber: true },
|
|
35
|
+
{ name: "BASEMENT", abbreviation: "BSMT", variants: [], requiresNumber: true },
|
|
36
|
+
{ name: "PENTHOUSE", abbreviation: "PH", variants: [], requiresNumber: false },
|
|
37
|
+
{ name: "LOBBY", abbreviation: "LBBY", variants: [], requiresNumber: false },
|
|
38
|
+
];
|
|
39
|
+
/**
|
|
40
|
+
* Inverse lookup: every surface form (canonical name, approved abbreviation, or Appendix C2
|
|
41
|
+
* variant) → its canonical designator name. Lowercase-keyed for case-insensitive matching: `"fl"` →
|
|
42
|
+
* `"FLOOR"`, `"bsmt"` → `"BASEMENT"`, `"ph"` → `"PENTHOUSE"`.
|
|
43
|
+
*/
|
|
44
|
+
export const US_FLOOR_DESIGNATOR_LOOKUP = (() => {
|
|
45
|
+
const out = new Map();
|
|
46
|
+
for (const row of US_FLOOR_DESIGNATORS) {
|
|
47
|
+
out.set(row.name.toLowerCase(), row.name);
|
|
48
|
+
out.set(row.abbreviation.toLowerCase(), row.name);
|
|
49
|
+
for (const v of row.variants) {
|
|
50
|
+
if (!out.has(v.toLowerCase()))
|
|
51
|
+
out.set(v.toLowerCase(), row.name);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return out;
|
|
55
|
+
})();
|
|
56
|
+
/**
|
|
57
|
+
* All lowercase surface tokens for the floor-class designators — the set the span proposer
|
|
58
|
+
* populates `levelDesignators` with when wiring the US codex slice. Includes canonical names,
|
|
59
|
+
* approved abbreviations, and Appendix C2 variants.
|
|
60
|
+
*/
|
|
61
|
+
export const US_FLOOR_DESIGNATOR_TOKENS = new Set(US_FLOOR_DESIGNATOR_LOOKUP.keys());
|
|
62
|
+
/** Approved USPS abbreviation per canonical floor designator name. */
|
|
63
|
+
export const US_FLOOR_DESIGNATOR_PREFERRED_ABBR = Object.fromEntries(US_FLOOR_DESIGNATORS.map((r) => [r.name, r.abbreviation]));
|
|
64
|
+
/**
|
|
65
|
+
* Look up a USPS floor-class designator (by canonical name, abbreviation, or any Appendix C2
|
|
66
|
+
* variant) and return the canonical name + approved abbreviation. Returns null if the token isn't a
|
|
67
|
+
* recognized floor-class designator.
|
|
68
|
+
*/
|
|
69
|
+
export function lookupFloorDesignator(input) {
|
|
70
|
+
if (!input || typeof input !== "string")
|
|
71
|
+
return null;
|
|
72
|
+
const designator = US_FLOOR_DESIGNATOR_LOOKUP.get(input.trim().toLowerCase());
|
|
73
|
+
if (!designator)
|
|
74
|
+
return null;
|
|
75
|
+
return { designator, abbreviation: US_FLOOR_DESIGNATOR_PREFERRED_ABBR[designator] };
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* True when a token is a recognized USPS floor-class secondary unit designator (case-insensitive) —
|
|
79
|
+
* `"Floor"`, `"FL"`, `"flr"`, `"bsmt"`, `"ph"`, `"lbby"`.
|
|
80
|
+
*/
|
|
81
|
+
export function isFloorDesignatorToken(input) {
|
|
82
|
+
return typeof input === "string" && US_FLOOR_DESIGNATOR_LOOKUP.has(input.trim().toLowerCase());
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=floor-designator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"floor-designator.js","sourceRoot":"","sources":["../../us/floor-designator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAuBH;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,KAAK,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE;IAC9E,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE;IAC9E,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE;IAC9E,EAAE,IAAI,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE;CAC5B,CAAA;AAKjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAA+C,CAAC,GAAG,EAAE;IAC3F,MAAM,GAAG,GAAG,IAAI,GAAG,EAAiC,CAAA;IACpD,KAAK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AA;AACpF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACpD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,0BAA0B,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;AAC/F,CAAC"}
|
package/out/us/index.d.ts
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The United States address system (USPS): street suffixes, secondary unit designators,
|
|
7
|
-
*
|
|
6
|
+
* The United States address system (USPS): street suffixes, secondary unit designators, floor-class
|
|
7
|
+
* designators (USPS Pub 28 C2 floor/level subset), military/diplomatic post office designators
|
|
8
|
+
* (USPS Pub 28 Chapter 7: APO/FPO/DPO + PSC/CMR/UNIT), ZIP codes, and the state abbreviations
|
|
9
|
+
* they hang off of.
|
|
8
10
|
*/
|
|
11
|
+
export * from "./floor-designator.js";
|
|
12
|
+
export * from "./military-address.js";
|
|
9
13
|
export * from "./po-box.js";
|
|
10
14
|
export * from "./state.js";
|
|
11
15
|
export * from "./street-directional.js";
|
package/out/us/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../us/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../us/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA"}
|
package/out/us/index.js
CHANGED
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
* @license AGPL-3.0
|
|
4
4
|
* @author Teffen Ellis, et al.
|
|
5
5
|
*
|
|
6
|
-
* The United States address system (USPS): street suffixes, secondary unit designators,
|
|
7
|
-
*
|
|
6
|
+
* The United States address system (USPS): street suffixes, secondary unit designators, floor-class
|
|
7
|
+
* designators (USPS Pub 28 C2 floor/level subset), military/diplomatic post office designators
|
|
8
|
+
* (USPS Pub 28 Chapter 7: APO/FPO/DPO + PSC/CMR/UNIT), ZIP codes, and the state abbreviations
|
|
9
|
+
* they hang off of.
|
|
8
10
|
*/
|
|
11
|
+
export * from "./floor-designator.js";
|
|
12
|
+
export * from "./military-address.js";
|
|
9
13
|
export * from "./po-box.js";
|
|
10
14
|
export * from "./state.js";
|
|
11
15
|
export * from "./street-directional.js";
|
package/out/us/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../us/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../us/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,uBAAuB,CAAA;AACrC,cAAc,uBAAuB,CAAA;AACrC,cAAc,aAAa,CAAA;AAC3B,cAAc,YAAY,CAAA;AAC1B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,sBAAsB,CAAA;AACpC,cAAc,cAAc,CAAA"}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* USPS Publication 28 — Military / Diplomatic Post Office designators.
|
|
7
|
+
*
|
|
8
|
+
* Military and diplomatic overseas addresses use a distinct addressing scheme: instead of a city
|
|
9
|
+
* name, a standardized location-class code (APO, FPO, DPO) appears on the city line, followed by
|
|
10
|
+
* the armed-forces "state" code (AA, AE, AP) and a 09xxx ZIP code. The unit/PSC/CMR line
|
|
11
|
+
* appearing above the city line identifies the specific installation unit, postal service center,
|
|
12
|
+
* or community mail room.
|
|
13
|
+
*
|
|
14
|
+
* Sourcing (accessed 2026-06-12):
|
|
15
|
+
*
|
|
16
|
+
* - **USPS Publication 28, Chapter 7** ("Armed Forces and Diplomatic Post Offices") defines the three
|
|
17
|
+
* armed-forces location codes and three state-code regions, and states: "Use APO with AA
|
|
18
|
+
* (Americas), AE (Europe/Middle East/Africa/Canada), or AP (Pacific)"; "FPO (Fleet Post
|
|
19
|
+
* Office) for Navy ships and shore installations"; "DPO (Diplomatic Post Office) for US
|
|
20
|
+
* embassies and missions." Full URL: https://pe.usps.com/text/pub28/28c7_001.htm
|
|
21
|
+
* - **USPS Publication 28, Appendix B** gives the complete list of accepted unit-line formats: `UNIT
|
|
22
|
+
* <id>`, `PSC <id> BOX <box>`, `CMR <id> BOX <box>`, and `UNIT <id> BOX <box>`. The same
|
|
23
|
+
* appendix notes the two-digit unit ranges for PSC/CMR/UNIT assignment by theater. Full URL:
|
|
24
|
+
* https://pe.usps.com/text/pub28/28apb_001.htm
|
|
25
|
+
* - The **Armed Forces "state" codes** (AA, AE, AP) are defined in the same USPS appendix and are
|
|
26
|
+
* also the official USPS abbreviations for the three Armed Forces addressing regions. See:
|
|
27
|
+
* https://pe.usps.com/text/pub28/28apb_002.htm
|
|
28
|
+
* - "DPO" for Diplomatic Post Offices was added as a distinct code in 2011 (USPS Customer/ Industry
|
|
29
|
+
* Notice 61). It does NOT replace APO in diplomatic mail — both exist, with DPO used
|
|
30
|
+
* specifically for State Department overseas posts and APO/FPO retained for DoD.
|
|
31
|
+
*
|
|
32
|
+
* @see {@link https://pe.usps.com/text/pub28/28c7_001.htm USPS Pub 28 Chapter 7 — Military Addresses}
|
|
33
|
+
* @see {@link https://pe.usps.com/text/pub28/28apb_001.htm USPS Pub 28 Appendix B — Armed Forces Addresses}
|
|
34
|
+
*/
|
|
35
|
+
/** USPS military / diplomatic post-office location codes (the "city" substitute on the city line). */
|
|
36
|
+
export declare const US_MILITARY_POST_OFFICE_CODES: readonly [{
|
|
37
|
+
readonly code: "APO";
|
|
38
|
+
readonly name: "Army Post Office";
|
|
39
|
+
readonly armedForces: true;
|
|
40
|
+
}, {
|
|
41
|
+
readonly code: "FPO";
|
|
42
|
+
readonly name: "Fleet Post Office";
|
|
43
|
+
readonly armedForces: true;
|
|
44
|
+
}, {
|
|
45
|
+
readonly code: "DPO";
|
|
46
|
+
readonly name: "Diplomatic Post Office";
|
|
47
|
+
readonly armedForces: false;
|
|
48
|
+
}];
|
|
49
|
+
export type UsMilitaryPostOfficeCode = (typeof US_MILITARY_POST_OFFICE_CODES)[number]["code"];
|
|
50
|
+
/**
|
|
51
|
+
* USPS Armed Forces "state" codes used in place of state names on military/diplomatic addresses.
|
|
52
|
+
* These appear where a US state abbreviation (NY, CA, …) would appear in a civilian address.
|
|
53
|
+
*/
|
|
54
|
+
export declare const US_ARMED_FORCES_REGIONS: readonly [{
|
|
55
|
+
readonly code: "AA";
|
|
56
|
+
readonly name: "Armed Forces Americas";
|
|
57
|
+
readonly description: "Americas (excluding Canada)";
|
|
58
|
+
}, {
|
|
59
|
+
readonly code: "AE";
|
|
60
|
+
readonly name: "Armed Forces Europe";
|
|
61
|
+
readonly description: "Europe, Middle East, Africa, and Canada";
|
|
62
|
+
}, {
|
|
63
|
+
readonly code: "AP";
|
|
64
|
+
readonly name: "Armed Forces Pacific";
|
|
65
|
+
readonly description: "Pacific";
|
|
66
|
+
}];
|
|
67
|
+
export type UsArmedForcesRegionCode = (typeof US_ARMED_FORCES_REGIONS)[number]["code"];
|
|
68
|
+
/**
|
|
69
|
+
* USPS Pub 28 Appendix B unit-line designators for military/diplomatic overseas addresses. Each
|
|
70
|
+
* designator introduces an installation identifier and optionally a box number.
|
|
71
|
+
*
|
|
72
|
+
* Format rules per Appendix B:
|
|
73
|
+
*
|
|
74
|
+
* - `PSC <id> BOX <box>` — Postal Service Center
|
|
75
|
+
* - `CMR <id> BOX <box>` — Community Mail Room
|
|
76
|
+
* - `UNIT <id> BOX <box>` — numbered unit (battalion/company); UNIT may stand alone with just an id
|
|
77
|
+
* and no BOX when the unit has direct mail delivery
|
|
78
|
+
*
|
|
79
|
+
* BOX is required for PSC and CMR; UNIT may omit BOX.
|
|
80
|
+
*/
|
|
81
|
+
export declare const US_MILITARY_UNIT_DESIGNATORS: readonly [{
|
|
82
|
+
readonly code: "PSC";
|
|
83
|
+
readonly name: "Postal Service Center";
|
|
84
|
+
readonly requiresBox: true;
|
|
85
|
+
readonly description: "Installation-level postal service center; format: PSC <id> BOX <box>";
|
|
86
|
+
}, {
|
|
87
|
+
readonly code: "CMR";
|
|
88
|
+
readonly name: "Community Mail Room";
|
|
89
|
+
readonly requiresBox: true;
|
|
90
|
+
readonly description: "Sub-installation mail room; format: CMR <id> BOX <box>";
|
|
91
|
+
}, {
|
|
92
|
+
readonly code: "UNIT";
|
|
93
|
+
readonly name: "Unit";
|
|
94
|
+
readonly requiresBox: false;
|
|
95
|
+
readonly description: "Numbered military unit (battalion/company); format: UNIT <id> [BOX <box>]";
|
|
96
|
+
}];
|
|
97
|
+
export type UsMilitaryUnitDesignatorCode = (typeof US_MILITARY_UNIT_DESIGNATORS)[number]["code"];
|
|
98
|
+
/** Result of a military address line parse (the unit line: PSC/CMR/UNIT). */
|
|
99
|
+
export interface UsMilitaryUnitMatch {
|
|
100
|
+
/** The designator as it appeared ("PSC", "CMR", "Unit"). */
|
|
101
|
+
matched: string;
|
|
102
|
+
/** The canonical designator code ("PSC", "CMR", "UNIT"). */
|
|
103
|
+
code: UsMilitaryUnitDesignatorCode;
|
|
104
|
+
/** The installation identifier ("1520", "453"). */
|
|
105
|
+
id: string;
|
|
106
|
+
/** The box number when present ("4620", "1234A"). */
|
|
107
|
+
box?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* If `input` is a USPS military unit-line ("PSC 1520 BOX 4620", "CMR 453 BOX 100", "UNIT 7 BOX
|
|
111
|
+
* 234A", "UNIT 7"), return the canonical designator, installation id, and optional box. Null
|
|
112
|
+
* otherwise. Throws on a PSC or CMR line without a BOX component (per Appendix B, BOX is required
|
|
113
|
+
* for PSC/CMR; a bare "PSC 1520" is malformed).
|
|
114
|
+
*/
|
|
115
|
+
export declare function matchMilitaryUnitLine(input: unknown): UsMilitaryUnitMatch | null;
|
|
116
|
+
/** Type-predicate: does the input look like a USPS military unit line (PSC/CMR/UNIT)? */
|
|
117
|
+
export declare function isMilitaryUnitLine(input: unknown): boolean;
|
|
118
|
+
/** Result of a military city-line parse (APO/FPO/DPO + region code + ZIP). */
|
|
119
|
+
export interface UsMilitaryCityMatch {
|
|
120
|
+
/** The post-office code as it appeared ("APO", "FPO", "DPO"). */
|
|
121
|
+
matched: string;
|
|
122
|
+
/** The canonical post-office code. */
|
|
123
|
+
code: UsMilitaryPostOfficeCode;
|
|
124
|
+
/** The Armed Forces region code ("AA", "AE", "AP"). */
|
|
125
|
+
region: UsArmedForcesRegionCode;
|
|
126
|
+
/**
|
|
127
|
+
* The 5-digit or 9-digit ZIP code. Typical ranges per Pub 28: 09xxx (AE), 34xxx (AA), 96xxx (AP)
|
|
128
|
+
* — range validation per region is caller responsibility.
|
|
129
|
+
*/
|
|
130
|
+
zip: string;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* If `input` is a USPS military city line ("APO AE 09165", "FPO AP 96602-1254", "DPO AE 09498",
|
|
134
|
+
* "APO AA 34022", "APO AP 96525"), return the canonical code, region, and ZIP. Null otherwise.
|
|
135
|
+
*
|
|
136
|
+
* ZIP ranges per Pub 28: AE (Europe/ME/Africa/Canada) → 09xxx; AP (Pacific) → 96xxx; AA (Americas)
|
|
137
|
+
* → 34xxx. Range validation per region is left to the caller; the matcher accepts any 5. or 9-digit
|
|
138
|
+
* ZIP paired with a valid region code.
|
|
139
|
+
*/
|
|
140
|
+
export declare function matchMilitaryCityLine(input: unknown): UsMilitaryCityMatch | null;
|
|
141
|
+
/** Type-predicate: does the input look like a USPS military city line (APO/FPO/DPO + region + ZIP)? */
|
|
142
|
+
export declare function isMilitaryCityLine(input: unknown): boolean;
|
|
143
|
+
//# sourceMappingURL=military-address.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"military-address.d.ts","sourceRoot":"","sources":["../../us/military-address.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,sGAAsG;AACtG,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAUhC,CAAA;AAEV,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7F;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAI1B,CAAA;AAEV,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,uBAAuB,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAEtF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;EAmB/B,CAAA;AAEV,MAAM,MAAM,4BAA4B,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAA;AAEhG,6EAA6E;AAC7E,MAAM,WAAW,mBAAmB;IACnC,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAA;IACf,4DAA4D;IAC5D,IAAI,EAAE,4BAA4B,CAAA;IAClC,mDAAmD;IACnD,EAAE,EAAE,MAAM,CAAA;IACV,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAA;CACZ;AAMD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAehF;AAED,yFAAyF;AACzF,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAM1D;AAED,8EAA8E;AAC9E,MAAM,WAAW,mBAAmB;IACnC,iEAAiE;IACjE,OAAO,EAAE,MAAM,CAAA;IACf,sCAAsC;IACtC,IAAI,EAAE,wBAAwB,CAAA;IAC9B,uDAAuD;IACvD,MAAM,EAAE,uBAAuB,CAAA;IAC/B;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAA;CACX;AAYD;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,mBAAmB,GAAG,IAAI,CAUhF;AAED,uGAAuG;AACvG,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAE1D"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @copyright Sister Software
|
|
3
|
+
* @license AGPL-3.0
|
|
4
|
+
* @author Teffen Ellis, et al.
|
|
5
|
+
*
|
|
6
|
+
* USPS Publication 28 — Military / Diplomatic Post Office designators.
|
|
7
|
+
*
|
|
8
|
+
* Military and diplomatic overseas addresses use a distinct addressing scheme: instead of a city
|
|
9
|
+
* name, a standardized location-class code (APO, FPO, DPO) appears on the city line, followed by
|
|
10
|
+
* the armed-forces "state" code (AA, AE, AP) and a 09xxx ZIP code. The unit/PSC/CMR line
|
|
11
|
+
* appearing above the city line identifies the specific installation unit, postal service center,
|
|
12
|
+
* or community mail room.
|
|
13
|
+
*
|
|
14
|
+
* Sourcing (accessed 2026-06-12):
|
|
15
|
+
*
|
|
16
|
+
* - **USPS Publication 28, Chapter 7** ("Armed Forces and Diplomatic Post Offices") defines the three
|
|
17
|
+
* armed-forces location codes and three state-code regions, and states: "Use APO with AA
|
|
18
|
+
* (Americas), AE (Europe/Middle East/Africa/Canada), or AP (Pacific)"; "FPO (Fleet Post
|
|
19
|
+
* Office) for Navy ships and shore installations"; "DPO (Diplomatic Post Office) for US
|
|
20
|
+
* embassies and missions." Full URL: https://pe.usps.com/text/pub28/28c7_001.htm
|
|
21
|
+
* - **USPS Publication 28, Appendix B** gives the complete list of accepted unit-line formats: `UNIT
|
|
22
|
+
* <id>`, `PSC <id> BOX <box>`, `CMR <id> BOX <box>`, and `UNIT <id> BOX <box>`. The same
|
|
23
|
+
* appendix notes the two-digit unit ranges for PSC/CMR/UNIT assignment by theater. Full URL:
|
|
24
|
+
* https://pe.usps.com/text/pub28/28apb_001.htm
|
|
25
|
+
* - The **Armed Forces "state" codes** (AA, AE, AP) are defined in the same USPS appendix and are
|
|
26
|
+
* also the official USPS abbreviations for the three Armed Forces addressing regions. See:
|
|
27
|
+
* https://pe.usps.com/text/pub28/28apb_002.htm
|
|
28
|
+
* - "DPO" for Diplomatic Post Offices was added as a distinct code in 2011 (USPS Customer/ Industry
|
|
29
|
+
* Notice 61). It does NOT replace APO in diplomatic mail — both exist, with DPO used
|
|
30
|
+
* specifically for State Department overseas posts and APO/FPO retained for DoD.
|
|
31
|
+
*
|
|
32
|
+
* @see {@link https://pe.usps.com/text/pub28/28c7_001.htm USPS Pub 28 Chapter 7 — Military Addresses}
|
|
33
|
+
* @see {@link https://pe.usps.com/text/pub28/28apb_001.htm USPS Pub 28 Appendix B — Armed Forces Addresses}
|
|
34
|
+
*/
|
|
35
|
+
/** USPS military / diplomatic post-office location codes (the "city" substitute on the city line). */
|
|
36
|
+
export const US_MILITARY_POST_OFFICE_CODES = [
|
|
37
|
+
/**
|
|
38
|
+
* Army Post Office — domestic USPS gateway for Army and Air Force overseas mail; also used for
|
|
39
|
+
* some diplomatic addresses (DPO is preferred for State Dept posts since 2011).
|
|
40
|
+
*/
|
|
41
|
+
{ code: "APO", name: "Army Post Office", armedForces: true },
|
|
42
|
+
/** Fleet Post Office — Navy ships and shore installations. */
|
|
43
|
+
{ code: "FPO", name: "Fleet Post Office", armedForces: true },
|
|
44
|
+
/** Diplomatic Post Office — US embassies and missions (added 2011). */
|
|
45
|
+
{ code: "DPO", name: "Diplomatic Post Office", armedForces: false },
|
|
46
|
+
];
|
|
47
|
+
/**
|
|
48
|
+
* USPS Armed Forces "state" codes used in place of state names on military/diplomatic addresses.
|
|
49
|
+
* These appear where a US state abbreviation (NY, CA, …) would appear in a civilian address.
|
|
50
|
+
*/
|
|
51
|
+
export const US_ARMED_FORCES_REGIONS = [
|
|
52
|
+
{ code: "AA", name: "Armed Forces Americas", description: "Americas (excluding Canada)" },
|
|
53
|
+
{ code: "AE", name: "Armed Forces Europe", description: "Europe, Middle East, Africa, and Canada" },
|
|
54
|
+
{ code: "AP", name: "Armed Forces Pacific", description: "Pacific" },
|
|
55
|
+
];
|
|
56
|
+
/**
|
|
57
|
+
* USPS Pub 28 Appendix B unit-line designators for military/diplomatic overseas addresses. Each
|
|
58
|
+
* designator introduces an installation identifier and optionally a box number.
|
|
59
|
+
*
|
|
60
|
+
* Format rules per Appendix B:
|
|
61
|
+
*
|
|
62
|
+
* - `PSC <id> BOX <box>` — Postal Service Center
|
|
63
|
+
* - `CMR <id> BOX <box>` — Community Mail Room
|
|
64
|
+
* - `UNIT <id> BOX <box>` — numbered unit (battalion/company); UNIT may stand alone with just an id
|
|
65
|
+
* and no BOX when the unit has direct mail delivery
|
|
66
|
+
*
|
|
67
|
+
* BOX is required for PSC and CMR; UNIT may omit BOX.
|
|
68
|
+
*/
|
|
69
|
+
export const US_MILITARY_UNIT_DESIGNATORS = [
|
|
70
|
+
{
|
|
71
|
+
code: "PSC",
|
|
72
|
+
name: "Postal Service Center",
|
|
73
|
+
requiresBox: true,
|
|
74
|
+
description: "Installation-level postal service center; format: PSC <id> BOX <box>",
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
code: "CMR",
|
|
78
|
+
name: "Community Mail Room",
|
|
79
|
+
requiresBox: true,
|
|
80
|
+
description: "Sub-installation mail room; format: CMR <id> BOX <box>",
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
code: "UNIT",
|
|
84
|
+
name: "Unit",
|
|
85
|
+
requiresBox: false,
|
|
86
|
+
description: "Numbered military unit (battalion/company); format: UNIT <id> [BOX <box>]",
|
|
87
|
+
},
|
|
88
|
+
];
|
|
89
|
+
// Unit-line regex: PSC/CMR/UNIT <id> [BOX <box>]
|
|
90
|
+
// Identifiers are numeric; box numbers are alphanumeric. UNIT may stand without BOX.
|
|
91
|
+
const UNIT_LINE_RE = /^\s*(psc|cmr|unit)\s+(\d+)(?:\s+box\s+([\dA-Za-z]+))?\s*$/i;
|
|
92
|
+
/**
|
|
93
|
+
* If `input` is a USPS military unit-line ("PSC 1520 BOX 4620", "CMR 453 BOX 100", "UNIT 7 BOX
|
|
94
|
+
* 234A", "UNIT 7"), return the canonical designator, installation id, and optional box. Null
|
|
95
|
+
* otherwise. Throws on a PSC or CMR line without a BOX component (per Appendix B, BOX is required
|
|
96
|
+
* for PSC/CMR; a bare "PSC 1520" is malformed).
|
|
97
|
+
*/
|
|
98
|
+
export function matchMilitaryUnitLine(input) {
|
|
99
|
+
if (typeof input !== "string")
|
|
100
|
+
return null;
|
|
101
|
+
const m = UNIT_LINE_RE.exec(input);
|
|
102
|
+
if (!m)
|
|
103
|
+
return null;
|
|
104
|
+
const code = m[1].toUpperCase();
|
|
105
|
+
const id = m[2];
|
|
106
|
+
const box = m[3];
|
|
107
|
+
const row = US_MILITARY_UNIT_DESIGNATORS.find((r) => r.code === code);
|
|
108
|
+
if (row.requiresBox && !box) {
|
|
109
|
+
throw new Error(`[codex/us/military-address] ${code} line requires a BOX component per USPS Pub 28 Appendix B; got bare "${input.trim()}"`);
|
|
110
|
+
}
|
|
111
|
+
return { matched: m[1], code, id, ...(box ? { box } : {}) };
|
|
112
|
+
}
|
|
113
|
+
/** Type-predicate: does the input look like a USPS military unit line (PSC/CMR/UNIT)? */
|
|
114
|
+
export function isMilitaryUnitLine(input) {
|
|
115
|
+
try {
|
|
116
|
+
return matchMilitaryUnitLine(input) !== null;
|
|
117
|
+
}
|
|
118
|
+
catch {
|
|
119
|
+
return false; // PSC/CMR without BOX is structurally malformed (not a false negative)
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
// City-line regex: APO/FPO/DPO <region> <zip>
|
|
123
|
+
// USPS military ZIP assignment per Pub 28 and the Armed Forces zip code list:
|
|
124
|
+
// - AA (Americas): 340xx range
|
|
125
|
+
// - AE (Europe/ME/Africa/Canada): 09xxx range
|
|
126
|
+
// - AP (Pacific): 962xx-966xx range
|
|
127
|
+
// The regex accepts any 5-digit or 9-digit ZIP code in combination with a valid region code —
|
|
128
|
+
// validating the specific numeric range for each region is left to the caller (region+ZIP
|
|
129
|
+
// co-validation is operational policy, not structural syntax).
|
|
130
|
+
const CITY_LINE_RE = /^\s*(apo|fpo|dpo)\s+(aa|ae|ap)\s+(\d{5}(?:-\d{4})?)\s*$/i;
|
|
131
|
+
/**
|
|
132
|
+
* If `input` is a USPS military city line ("APO AE 09165", "FPO AP 96602-1254", "DPO AE 09498",
|
|
133
|
+
* "APO AA 34022", "APO AP 96525"), return the canonical code, region, and ZIP. Null otherwise.
|
|
134
|
+
*
|
|
135
|
+
* ZIP ranges per Pub 28: AE (Europe/ME/Africa/Canada) → 09xxx; AP (Pacific) → 96xxx; AA (Americas)
|
|
136
|
+
* → 34xxx. Range validation per region is left to the caller; the matcher accepts any 5. or 9-digit
|
|
137
|
+
* ZIP paired with a valid region code.
|
|
138
|
+
*/
|
|
139
|
+
export function matchMilitaryCityLine(input) {
|
|
140
|
+
if (typeof input !== "string")
|
|
141
|
+
return null;
|
|
142
|
+
const m = CITY_LINE_RE.exec(input);
|
|
143
|
+
if (!m)
|
|
144
|
+
return null;
|
|
145
|
+
return {
|
|
146
|
+
matched: m[1].toUpperCase(),
|
|
147
|
+
code: m[1].toUpperCase(),
|
|
148
|
+
region: m[2].toUpperCase(),
|
|
149
|
+
zip: m[3],
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
/** Type-predicate: does the input look like a USPS military city line (APO/FPO/DPO + region + ZIP)? */
|
|
153
|
+
export function isMilitaryCityLine(input) {
|
|
154
|
+
return matchMilitaryCityLine(input) !== null;
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=military-address.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"military-address.js","sourceRoot":"","sources":["../../us/military-address.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,sGAAsG;AACtG,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC5C;;;OAGG;IACH,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,IAAI,EAAE;IAC5D,8DAA8D;IAC9D,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,IAAI,EAAE;IAC7D,uEAAuE;IACvE,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,wBAAwB,EAAE,WAAW,EAAE,KAAK,EAAE;CAC1D,CAAA;AAIV;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACtC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE,WAAW,EAAE,6BAA6B,EAAE;IACzF,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,qBAAqB,EAAE,WAAW,EAAE,yCAAyC,EAAE;IACnG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,sBAAsB,EAAE,WAAW,EAAE,SAAS,EAAE;CAC3D,CAAA;AAIV;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC3C;QACC,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,uBAAuB;QAC7B,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,sEAAsE;KACnF;IACD;QACC,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EAAE,IAAI;QACjB,WAAW,EAAE,wDAAwD;KACrE;IACD;QACC,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,MAAM;QACZ,WAAW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ACF,CAAC;AAiBD,8CAA8C;AAC9C,8EAA8E;AAC9E,iCAAiC;AACjC,gDAAgD;AAChD,sCAAsC;AACtC,8FAA8F;AAC9F,0FAA0F;AAC1F,+DAA+D;AAC/D,MAAM,YAAY,GAAG,0DAA0D,CAAA;AAE/E;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAc;IACnD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAA;IAC1C,MAAM,CAAC,GAAG,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAClC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IACnB,OAAO;QACN,OAAO,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE;QAC5B,IAAI,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,EAA8B;QACrD,MAAM,EAAE,CAAC,CAAC,CAAC,CAAE,CAAC,WAAW,EAA6B;QACtD,GAAG,EAAE,CAAC,CAAC,CAAC,CAAE;KACV,CAAA;AACF,CAAC;AAED,uGAAuG;AACvG,MAAM,UAAU,kBAAkB,CAAC,KAAc;IAChD,OAAO,qBAAqB,CAAC,KAAK,CAAC,KAAK,IAAI,CAAA;AAC7C,CAAC"}
|
|
@@ -96,7 +96,9 @@ export declare function renderDirectional(match: {
|
|
|
96
96
|
canonical: DirectionalName;
|
|
97
97
|
abbreviation: DirectionalAbbreviation;
|
|
98
98
|
}, form: "abbr" | "full", reference: string): string;
|
|
99
|
-
/**
|
|
100
|
-
`"
|
|
99
|
+
/**
|
|
100
|
+
* Case-insensitive check: is the token any USPS directional or abbreviation (`"N"`, `"north"`,
|
|
101
|
+
* `"NW"`)?
|
|
102
|
+
*/
|
|
101
103
|
export declare function isStreetDirectionalToken(input: unknown): boolean;
|
|
102
104
|
//# sourceMappingURL=street-directional.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"street-directional.d.ts","sourceRoot":"","sources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AA;AAErE,MAAM,MAAM,2BAA2B,GAAG,OAAO,2BAA2B,CAAA;AAE5E,yDAAyD;AACzD,eAAO,MAAM,yBAAyB,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAE1E,CAAA;AAED,oDAAoD;AACpD,eAAO,MAAM,4BAA4B,EAAE,WAAW,CAAC,MAAM,EAAE,uBAAuB,CAErF,CAAA;AAED,+FAA+F;AAC/F,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,GAAG,IAAI,CAG3E;AAED,0FAA0F;AAC1F,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,OAAO,GAAG,uBAAuB,GAAG,IAAI,CAO5F;AAED,4FAA4F;AAC5F,MAAM,WAAW,gBAAgB;IAChC,gEAAgE;IAChE,WAAW,EAAE,eAAe,CAAA;IAC5B,2DAA2D;IAC3D,YAAY,EAAE,uBAAuB,CAAA;CACrC;AAED,2FAA2F;AAC3F,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,GAAG,IAAI,CAOzE;AAID;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,MAAM,GACZ;IAAE,SAAS,EAAE,eAAe,CAAC;IAAC,YAAY,EAAE,uBAAuB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAO/F;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAChC,KAAK,EAAE;IAAE,SAAS,EAAE,eAAe,CAAC;IAAC,YAAY,EAAE,uBAAuB,CAAA;CAAE,EAC5E,IAAI,EAAE,MAAM,GAAG,MAAM,EACrB,SAAS,EAAE,MAAM,GACf,MAAM,CAGR;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAEhE"}
|
|
@@ -151,8 +151,10 @@ export function renderDirectional(match, form, reference) {
|
|
|
151
151
|
const target = form === "abbr" ? match.abbreviation : match.canonical.replace(/\s+/g, "");
|
|
152
152
|
return matchCase(target, reference);
|
|
153
153
|
}
|
|
154
|
-
/**
|
|
155
|
-
`"
|
|
154
|
+
/**
|
|
155
|
+
* Case-insensitive check: is the token any USPS directional or abbreviation (`"N"`, `"north"`,
|
|
156
|
+
* `"NW"`)?
|
|
157
|
+
*/
|
|
156
158
|
export function isStreetDirectionalToken(input) {
|
|
157
159
|
return lookupDirectional(typeof input === "string" ? input.trim() : input) !== null;
|
|
158
160
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"street-directional.js","sourceRoot":"","sources":["../../us/street-directional.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;GAGG;AACH,MAAM,CAAN,IAAY,uBASX;AATD,WAAY,uBAAuB;IAClC,sCAAW,CAAA;IACX,qCAAU,CAAA;IACV,sCAAW,CAAA;IACX,qCAAU,CAAA;IACV,2CAAgB,CAAA;IAChB,2CAAgB,CAAA;IAChB,2CAAgB,CAAA;IAChB,2CAAgB,CAAA;AACjB,CAAC,EATW,uBAAuB,KAAvB,uBAAuB,QASlC;AAED,iGAAiG;AACjG,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;CACyB,CAAA;AAItC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,GAAG,gBAAgB;IACnB,mEAAmE;IACnE,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,cAAc;IACd,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,cAAc;IACd,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,WAAW;IACX,WAAW;IAC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ACtC,MAAM,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;IAClC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IACnB,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;AAClF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAChC,KAA4E,EAC5E,IAAqB,EACrB,SAAiB;IAEjB,MAAM,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IACzF,OAAO,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACpC,CAAC;AAED;
|
|
1
|
+
{"version":3,"file":"street-directional.js","sourceRoot":"","sources":["../../us/street-directional.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAE9C;;;GAGG;AACH,MAAM,CAAN,IAAY,uBASX;AATD,WAAY,uBAAuB;IAClC,sCAAW,CAAA;IACX,qCAAU,CAAA;IACV,sCAAW,CAAA;IACX,qCAAU,CAAA;IACV,2CAAgB,CAAA;IAChB,2CAAgB,CAAA;IAChB,2CAAgB,CAAA;IAChB,2CAAgB,CAAA;AACjB,CAAC,EATW,uBAAuB,KAAvB,uBAAuB,QASlC;AAED,iGAAiG;AACjG,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC/B,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,YAAY;IACZ,YAAY;CACyB,CAAA;AAItC,MAAM,CAAC,MAAM,yBAAyB,GAAG;IACxC,GAAG,gBAAgB;IACnB,mEAAmE;IACnE,WAAW;IACX,WAAW;IACX,WAAW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G;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACtC,MAAc;IAEd,MAAM,OAAO,GAAG,MAAM,CAAC,IAAI,EAAE,CAAA;IAC7B,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IACzB,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,CAAA;IACtC,MAAM,CAAC,GAAG,iBAAiB,CAAC,KAAK,CAAC,CAAA;IAClC,IAAI,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IACnB,OAAO,EAAE,SAAS,EAAE,CAAC,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC,YAAY,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA;AAClF,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB,CAChC,KAA4E,EAC5E,IAAqB,EACrB,SAAiB;IAEjB,MAAM,MAAM,GAAG,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAA;IACzF,OAAO,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACpC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACtD,OAAO,iBAAiB,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,IAAI,CAAA;AACpF,CAAC"}
|
package/out/us/zipcode.d.ts
CHANGED
|
@@ -146,7 +146,7 @@ export declare const StateAbbreviationZipCodePrefixRecord: {
|
|
|
146
146
|
/**
|
|
147
147
|
* Map of ZIP code prefixes to their corresponding US state abbreviations.
|
|
148
148
|
*/
|
|
149
|
-
declare const ZipCodePrefixAbbreviationMap: Map<ZipCodeDigit, ("KY" | "PA" | "AL" | "AK" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "
|
|
149
|
+
declare const ZipCodePrefixAbbreviationMap: Map<ZipCodeDigit, ("MS" | "WA" | "KY" | "PA" | "FL" | "AL" | "AK" | "AZ" | "AR" | "CA" | "CO" | "CT" | "DE" | "DC" | "GA" | "HI" | "ID" | "IL" | "IN" | "IA" | "KS" | "LA" | "ME" | "MD" | "MA" | "MI" | "MN" | "MO" | "MT" | "NE" | "NV" | "NH" | "NJ" | "NM" | "NY" | "NC" | "ND" | "OH" | "OK" | "OR" | "RI" | "SC" | "SD" | "TN" | "TX" | "UT" | "VT" | "VA" | "WV" | "WI" | "WY" | "PR" | "GU" | "VI" | "MP" | "AS")[]>;
|
|
150
150
|
export { ZipCodePrefixAbbreviationMap };
|
|
151
151
|
/**
|
|
152
152
|
* Regex patterns for ZIP codes.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mailwoman/codex",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.5.0",
|
|
4
4
|
"description": "Per-address-system postal reference data + branded types (USPS street suffixes, US ZIP codes). Pure, zero-runtime-dep — the shared canonical home for postal-system primitives the parser, resolver, and synthesis layers all reach for.",
|
|
5
5
|
"license": "AGPL-3.0-only",
|
|
6
6
|
"repository": {
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
"./fr": "./out/fr/index.js",
|
|
19
19
|
"./ca": "./out/ca/index.js",
|
|
20
20
|
"./gb": "./out/gb/index.js",
|
|
21
|
-
"./jp": "./out/jp/index.js"
|
|
21
|
+
"./jp": "./out/jp/index.js",
|
|
22
|
+
"./au": "./out/au/index.js",
|
|
23
|
+
"./nz": "./out/nz/index.js"
|
|
22
24
|
},
|
|
23
25
|
"dependencies": {
|
|
24
26
|
"type-fest": "^5.7.0"
|