Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pay-k/australia-address-parser
https://github.com/pay-k/australia-address-parser
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/pay-k/australia-address-parser
- Owner: pay-k
- Created: 2019-12-30T16:44:16.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-13T14:14:47.000Z (almost 5 years ago)
- Last Synced: 2024-08-09T13:27:32.387Z (6 months ago)
- Language: JavaScript
- Size: 36.1 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# **Australia Address Parser**
Australia Address Parser is a regex-based street address and street intersection parser for Australia🇦🇺. It's basic goal is parsing user-provided address strings into parts, thus identify the street type (that Google API is not providing).
## Project Version Status
v1.0.0This project is currently in development.
#### Usage:
```javascript
//install
npm install parse-address
var parser = require('australia-address-parser');//use in browser
//Standard Address
parser.parseLocation('1 Darling Island Road, Pyrmont NSW 2009');//Output
{ streetNumber: '1',
streetName: 'Darling Island',
streetType: 'Road',
suburb: 'Pyrmont',
state: 'NSW',
postcode: '2009' }//Intersection of roads
parser.parseLocation('Breakfast Creek Rd & Austin St, Newstead QLD 4006');//Output
{ streetName1: 'Breakfast Creek',
streetType1: 'Rd',
streetName2: 'Austin',
streetType2: 'St',
suburb: 'Newstead',
state: 'QLD',
postcode: '4006',
streetName: 'Breakfast Creek Rd & Austin St' }//Address with unit
parser.parseLocation('13A Burlina Cct, Elizabeth Hills NSW 2171');//Output
{ unitType: 'unit',
unitNumber: 'A',
streetName: 'Burlina',
streetType: 'Cct',
suburb: 'Elizabeth Hills',
state: 'NSW',
postcode: '2171' }
```