contact-parser
A simple node module to parse street address strings (such as an email signature) into component parts. It's in use over at Barnivore where we input a lot of street addresses.
At present it's optimized for United States and Canadian street addresses; other address formats will be supported as we hammer the bugs out in production.
Installation
npm install contact-parser
Usage
Include the module
var ContactParser = ;
Parse some address strings
var parser = var result = parserconsole; // {name: 'Jason', email: '', province: '', country: '', address: '1 Yonge St', postal: '', website: '', phone: ''}
Error handling
If passed an empty input (including null or undefined strings) the result will be empty strings for all fields and a score of 0.
Bugs
I'm sure there are several :) Help fix them by submitting an issue, or better yet, a tested pull request.