@globalx/address-abbreviations
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

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'

/@globalx/address-abbreviations/

    Package Sidebar

    Install

    npm i @globalx/address-abbreviations

    Weekly Downloads

    65

    Version

    1.0.4

    License

    ISC

    Unpacked Size

    46 kB

    Total Files

    14

    Last publish

    Collaborators

    • isaac_h_globalx