madison

A dirt simple utility for working with US state names and abbreviations.

madison

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

npm install madison

Require madison:

var madison = require('madison');

Get a state's abbreviation:

madison.getStateAbbrev('virginia');

Get a state's name:

madison.getStateName('va');

Get a JSON array of US states, each containing 'name' and 'abbr' properties:

madison.states;