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

2.3.4 • Public • Published

@zerodep/address-secondary

version language types license

CodeFactor Known Vulnerabilities

A parser to find where a secondary 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 { addressSecondary } from '@zerodep/address-secondary';
// or
const { addressSecondary } = require('@zerodep/address-secondary');

Use Case

addressSecondary('basement 1234 Main Street East Los Angeles CA, US');
//  [
//    {
//      secondary: 'BSMT',
//      source: 'basement',
//      ndx: 0,
//      length: 8,
//      hasUnit: false,
//    },
//  ]

addressSecondary('office 1234 Main Street East ph 4 Los Angeles CA, US');
// [
//   {
//     secondary: 'OFC',
//     source: 'office',
//     ndx: 0,
//     length: 6,
//     hasUnit: true,
//   },
//   {
//     secondary: 'PH',
//     source: 'ph',
//     ndx: 29,
//     length: 2,
//     hasUnit: true,
//   },
// ]

Readme

Keywords

Package Sidebar

Install

npm i @zerodep/address-secondary

Homepage

zerodep.app

Weekly Downloads

1

Version

2.3.4

License

MIT

Unpacked Size

7.88 kB

Total Files

7

Last publish

Collaborators

  • cdepage