
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
areacode-to-zipcode
Advanced tools
Translate area codes to zip codes. A utility for looking up postal codes in the US.
This library provides a simple utility to look up a US ZIP code by area code.
Clone this repository and install dependencies:
npm install areacode-to-zipcode
Import the functions and use them in your TypeScript or JavaScript project:
import { getZipcodeFromAreaCode, getDataFromAreaCode } from './lib';
const zip = getZipcodeFromAreaCode(212); // '10024'
console.log(zip);
const data = getDataFromAreaCode(212);
/*
{
city: "New York City",
state: "NY",
zipCode: "10024",
country: "US"
}
*/
console.log(data);
If the area code is not found, the functions return null.
getZipcodeFromAreaCode(areaCode: number): string | nullnull if not found.getDataFromAreaCode(areaCode: number): { city: string | null, state: string | null, zipCode: string | null, country: string | null } | nullcity, state, zipCode, and country fields, or null if not found.Run tests with:
npm test
Area code to ZIP code mappings are stored in lib/data.json.
FAQs
Translate area codes to zip codes. A utility for looking up postal codes in the US.
The npm package areacode-to-zipcode receives a total of 50 weekly downloads. As such, areacode-to-zipcode popularity was classified as not popular.
We found that areacode-to-zipcode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.