parse-address icon indicating copy to clipboard operation
parse-address copied to clipboard

Adding country at the end of an address makes parsed address set city to street and street to prefix

Open rizowski opened this issue 5 years ago • 1 comments

Given the following: 1800 N, Lehi, UT 84043, USA

I would expect to see

{
  number: '1800',
  street: 'N',
  city: 'Lehi',
  state: 'UT',
  zip: '84043'
}

Instead I get:

{
	number: '1800',
  prefix: 'N',
  street: 'Lehi',
}

Should USA just be omitted? Given that this just parses US addresses?

rizowski avatar Apr 16 '19 19:04 rizowski

Correct. You just need to remove the country at the end.

varadara avatar Apr 18 '19 16:04 varadara