Street address parser for Node.js with normalization and secondary unit detection. Current stable version 1.1.20 (last released 2023). Parses US addresses into components (street number, name, suffix, direction, city, state, zip+4). Handles extra whitespace, trailing directionals, PO boxes, and secondary units without delimiters. Normalizes to Title Case and standardizes street suffixes. Includes utility functions for random city generation and city lookup. Ships TypeScript types. Limited to US addresses; no geocoding or validation against real addresses.
npm install addresserNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Parses a US address into components, demonstrates secondary unit handling, and shows random city generation.
Ensure input addresses are US-based, or use a library like node-postal for international support.
Use a geocoding service (e.g., Google Maps API) to verify address existence if needed.
Accept normalized output as-is; there is no configuration to modify this behavior.
Check for zipCodePlusFour property existence before using it; do not assume it is always present.
Run 'npm install addresser' in your project root, or ensure it is listed in package.json dependencies.
Use 'import addresser from 'addresser'' or 'const addresser = require('addresser')' in CommonJS.Import the whole module and call addresser.randomCity(): 'const addresser = require('addresser'); addresser.randomCity()'.No dependency data recorded yet.