@sroussey/parse-address
Version:
International street address parser for 220 jurisdictions (US, CA + 218 countries and territories), with SEC EDGAR country-code resolution
10 lines (9 loc) • 449 B
TypeScript
/**
* Collapse a comma-separated locality chain in `parsed.city` down to its last
* element and record the earlier ones as dropped.
*
* @param parsed the in-progress parse result, mutated in place
* @param labels number-label words the grammar consumes but never emits
* ("Plot", "House"); always reported as dropped
*/
export declare function keepLastLocality(parsed: Record<string, any>, labels?: readonly string[]): void;