madison

2.0.0 • Public • Published

Build Status

madison

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

Usage

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;

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.0.0
    33
    • latest

Version History

Package Sidebar

Install

npm i madison

Weekly Downloads

1,224

Version

2.0.0

License

MIT

Unpacked Size

6.57 MB

Total Files

108

Last publish

Collaborators

  • mdb