UNPKG

@sroussey/parse-address

Version:
21 lines (20 loc) 918 B
import XRegExp from "xregexp"; import { AddressParserImpl } from "../../types/parser"; export declare class AddressParserCA implements AddressParserImpl { normalizeAddress(parts: any): Record<string, any> | null; parseStreet(street_address: string): Record<string, any> | null; parseAddress(address: string): Record<string, any> | null; parseInformalAddress(address: string): Record<string, any> | null; parsePoAddress(address: string): Record<string, any> | null; parseLocation(address: string): Record<string, any> | null; parseIntersection(address: string): XRegExp.ExecArray | null; findStreetTypeShortCode(streetType?: string): string; /** * Post-process Canadian addresses to fix common parsing issues */ private postProcessCanadianAddress; /** * Analyze the original address to find the best street type match */ private findBestStreetType; }