# madison

> A minimal utility for working with US state names and abbreviations.

Latest version **2.0.1** (published 2025-10-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install madison
pnpm add madison
yarn add madison
bun add madison
```

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.0.1 |
| Published | 2025-10-05 |
| First published | 2012-10-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Mike Ball |
| Maintainers | mdb |

## Links

- npm: https://www.npmjs.com/package/madison
- Repository: https://github.com/mdb/madison
- Homepage: https://github.com/mdb/madison#readme
- Issues: https://github.com/mdb/madison/issues
- npm.io page: https://npm.io/package/madison

## Recent versions

- 2.0.1 (latest) — 2025-10-05
- 2.0.0 — 2019-09-14
- 1.1.0 — 2019-04-11
- 1.0.2 — 2017-03-17
- 1.0.1 — 2015-12-31
- 0.0.10 — 2015-09-02
- 0.0.9 — 2015-08-31
- 0.0.8 — 2015-07-01
- 0.0.7 — 2013-05-25
- 0.0.6 — 2012-10-17
- 0.0.5 — 2012-10-12
- 0.0.4 — 2012-10-04
- 0.0.3 — 2012-10-01
- 0.0.2 — 2012-10-01
- 0.0.1 — 2012-10-01

## README

[![cicd](https://github.com/mdb/madison/actions/workflows/cicd.yaml/badge.svg)](https://github.com/mdb/madison/actions/workflows/cicd.yaml)

# madison

A minimal Node.js module for working with US state names and abbreviations.

## Usage

```javascript
const madison = require('madison');

// Get a state's abbreviation
console.log(madison.getStateAbbrev('virginia')); // 'VA'
console.log(madison.getStateAbbrev('vIrgiNia')); // 'VA'
console.log(madison.getStateAbbrev('foo')); // undefined

// Get a state's name
console.log(madison.getStateName('va')); // 'Virginia'
console.log(madison.getStateName('vA')); // 'Virginia'
console.log(madison.getStateName('foo')); // undefined

// Get a JSON array of US states, each containing 'name' and 'abbr' properties:
madison.states;
```

---
_Source: https://npm.io/package/madison · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
