{"id":24883,"library":"addresser","title":"addresser","description":"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.","status":"active","version":"1.1.20","language":"javascript","source_language":"en","source_url":"https://github.com/moneals/addresser","tags":["javascript","address","parser","street","typescript"],"install":[{"cmd":"npm install addresser","lang":"bash","label":"npm"},{"cmd":"yarn add addresser","lang":"bash","label":"yarn"},{"cmd":"pnpm add addresser","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Package exports a default object with methods: parseAddress, randomCity, cities. TypeScript types are included; use default import.","wrong":"const addresser = require('addresser')","symbol":"addresser","correct":"import addresser from 'addresser'"},{"note":"parseAddress is a method on the default export, not a named export.","wrong":"import { parseAddress } from 'addresser'","symbol":"parseAddress","correct":"import addresser from 'addresser'; addresser.parseAddress(...)"},{"note":"randomCity is a method on the default export. CommonJS destructuring won't work because the library uses module.exports = {...}.","wrong":"const { randomCity } = require('addresser')","symbol":"randomCity","correct":"import addresser from 'addresser'; addresser.randomCity()"}],"quickstart":{"code":"import addresser from 'addresser';\n\n// Parse a full US address\nconst result = addresser.parseAddress('400 South Orange Ave, South Orange, NJ 07079');\nconsole.log(result.formattedAddress); // '400 South Orange Ave, South Orange, NJ 07079'\nconsole.log(result.streetNumber);     // '400'\nconsole.log(result.streetName);       // 'South Orange'\nconsole.log(result.streetSuffix);     // 'Ave'\nconsole.log(result.placeName);        // 'South Orange'\nconsole.log(result.stateAbbreviation);// 'NJ'\nconsole.log(result.zipCode);          // '07079'\n\n// Handle secondary units\nconst unitResult = addresser.parseAddress('1301 Columbia College Drive Unit 101 Columbia, SC 29203');\nconsole.log(unitResult.addressLine2); // 'Unit 101'\n\n// Get a random city\nconst city = addresser.randomCity();\nconsole.log(city.city); // e.g., 'Irwin'\nconsole.log(city.state); // e.g., 'ID'","lang":"typescript","description":"Parses a US address into components, demonstrates secondary unit handling, and shows random city generation."},"warnings":[{"fix":"Ensure input addresses are US-based, or use a library like node-postal for international support.","message":"Package only supports US addresses. Non-US addresses will produce undefined or incorrect fields.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Use a geocoding service (e.g., Google Maps API) to verify address existence if needed.","message":"parseAddress does not validate whether the address actually exists; it only parses the string into components.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Accept normalized output as-is; there is no configuration to modify this behavior.","message":"Output formatting (Title Case, standardized suffixes) is hardcoded; no options to preserve original casing or abbreviations.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check for zipCodePlusFour property existence before using it; do not assume it is always present.","message":"Zip+4 handling: zipCodePlusFour field appears only when the input includes a +4 extension (e.g., '29526-1234'). It is not always present.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'npm install addresser' in your project root, or ensure it is listed in package.json dependencies.","cause":"Package not installed or is installed in a different location.","error":"Cannot find module 'addresser'"},{"fix":"Use 'import addresser from 'addresser'' or 'const addresser = require('addresser')' in CommonJS.","cause":"Importing incorrectly: using named import instead of default import.","error":"addresser.parseAddress is not a function"},{"fix":"Import the whole module and call addresser.randomCity(): 'const addresser = require('addresser'); addresser.randomCity()'.","cause":"Destructuring randomCity from the module incorrectly (e.g., const { randomCity } = require('addresser')).","error":"TypeError: addresser.randomCity is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}