Skip to content

furkot/address

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published