1.0.4 • Published 3 years ago

@globalx/address-abbreviations v1.0.4

Weekly downloads
31
License
ISC
Repository
-
Last release
3 years ago

Summary

Lib and spec for taking address strings and changing common words to abbreviations. Address string is "32 SMITH STREET BELMONT NSW 2123"

return is "32 SMITH ST BELMONT NSW 2123"

It will handle prefix and suffix (street types)

It will not handle "32 STREET AVENUE" it would return "32 ST AVE"

Also has a separate function to split the address to multilines with your own delimineter.

Install/run

yarn install @globalx/address-abbreviations

Usage

import { abbreviateAddress, formatAddress } from '../src/abbreviate_address';

abbreviateAddress("32 SMITH STREET GATTON") # '32 SMITH ST GATTON'

formatAddress("32 SMITH ST GATTON QLD 4123", '|')) #'32 SMITH ST|GATTON QLD 4123'