https://github.com/starryinternet/street-suffix
https://github.com/starryinternet/street-suffix
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/starryinternet/street-suffix
- Owner: StarryInternet
- License: mit
- Created: 2018-02-28T20:42:46.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-05T17:33:35.000Z (over 7 years ago)
- Last Synced: 2024-04-25T09:20:29.046Z (about 2 years ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 6
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# street-suffix
Utility for expanding and abbreviating US street types from their many abbreviations.
### Instaling
```
npm install --save street-suffix
```
### Examples
#### Expanding Street Types
Expanding a street type abbreviation into it's full USPS suffix street-suffix
```js
let suffix = require('street-suffix');
suffix.expand('st') // STREET
suffix.expand('ave') // AVENUE
suffix.expand('av') // AVENUE
suffix.expand('avenue'); // AVENUE
```
#### Abbreviating Street Types
Abbreviating a street type suffix or abbreviation into it's USPS standard abbreviation
```js
let suffix = require('street-suffix');
suffix.abbreviate('street'); // ST
suffix.abbreviate('avenue'); // AVE
suffix.abbreviate('ave'); // AVE
suffix.abbreviate('av'); // AVE
```
This works for all [standard USPS abbreviations](https://pe.usps.com/text/pub28/28apc_002.htm)