intl-address-format
Version:
Lightweight address formatter with country and locale support.
21 lines (20 loc) • 596 B
TypeScript
export type Address = {
name?: string;
company?: string;
houseNumber?: string;
street?: string;
street2?: string;
city?: string;
state?: string;
postalCode?: string;
country?: string;
taxNumber?: string;
};
export type FormatAddressOptions = {
countryCode: string;
locale?: string;
address: Address;
output?: 'string' | 'html' | 'webcomponent';
};
export declare function formatAddress({ countryCode, locale, address, output }: FormatAddressOptions): string | HTMLElement;
export { default as IntlAddress } from './components/IntlAddress';