parse-address
parse-address copied to clipboard
Adding country at the end of an address makes parsed address set city to street and street to prefix
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?
Correct. You just need to remove the country at the end.