@zerodep/address-country
A parser to find where a state name or abbreviation is in a string.
Full documentation is available at the zerodep.app page.
Examples
All @zerodep packages support both ESM and CJS.
import { addressState } from '@zerodep/address-state';
const { addressState } = require('@zerodep/address-state');
Well Formatted Case
addressState('1234 Main Street, Los Angeles California, 90210');
addressState('13375 rue rita pierrefonds quebec h8z1j3');
With Multiple Results
addressCountry('#4 Washington Street, Portland OR 97603');
Successful Case - Mixed Countries
addressState('1234 oregon street, toronto ont');