@furkot/address

Furkot address normalizer.


Keywords
furkot
License
MIT
Install
npm install @furkot/address@0.0.3

Documentation

NPM version Build Status Dependency Status

address

Furkot address normalizer.

Install

$ npm install --save @furkot/address

Usage

const {
  normalize,
  stringify,
  parse,
  prettify
} = require('@furkot/address');

normalize('123 Main St, Los Angeles, California'); // => '123 Main St,Los Angeles,CA,US'

stringify({
  house: 123,
  street: 'Main St',
  city: 'Los Angeles',
  province: 'California',
  country: 'USA'
}); // => '123 Main St,Los Angeles,CA,US'

parse('123 Main St,Los Angeles,CA,US'); // =>
// { house: 123,
//   street: 'Main St',
//   city: 'Los Angeles',
//   province: 'CA',
//   country: 'USA'
// }; 

prettify(',Los Angeles,CA,US'); // => 'Los Angeles, CA'
prettify('123 Main St,Toronto,ON,CA'); // => '123 Main St, Toronto, ON, Canada'
prettify('1 Via Toselli,Taranto,Taranto,IT'); // => '1 Via Toselli, Taranto, Italy

License

MIT © Natalia Kowalczyk