Giter Site home page Giter Site logo

gordonlkc / autralia-address-parser Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 9.0 14 KB

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).

JavaScript 100.00%

autralia-address-parser's Introduction

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.0

This project is currently in development.

Usage:

//install
npm install parse-address
var parser = require('australia-address-parser'); 

//use in browser
<script type="text/javascript" src="./auAddressParser.min.js"></script>

//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' }

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.