geo-streetaddress-canada
This is a NodeJS wrapper for Perl extension Geo::StreetAddress::Canada.
Geo::StreetAddress::Canada is a regex-based street address and street intersection parser for Canada. Its basic goal is to be as forgiving as possible when parsing user-provided address strings. Geo::StreetAddress::Canada knows about directional prefixes and suffixes, fractional building numbers, building units, grid-based addresses, postal codes, and all of the official Canada Post abbreviations for street types, province names and secondary unit designators. Please note that this extension will only return data in English.
Dependencies
- Node.js v6
- Perl 5.24+
Usage
Install GeoStreetAddressCanada from npm
npm install --save geo-streetaddress-canada
Use in NodeJS:
var geoStreetAddressCanada = geoStreetAddressCanada /*{ postalcode: 'H3A 0G4', street: 'Rue Sherbrooke O', city: 'Montral', number: '845', type: '', province: 'QC'}*/ geoStreetAddressCanada /*{ city: 'Montral', type: '', province: 'QC', street: 'Rue Sherbrooke O', number: '7141', postalcode: 'H4B 1R6'}*/ geoStreetAddressCanada /*{ number: '2900', postalcode: 'H3T 1J4', province: 'QC', type: '', street: 'Boulevard Edouard-Montpetit', city: 'Montral' }*/