1.0.4 • Published 3 years ago

merica v1.0.4

Weekly downloads
2
License
MIT
Repository
-
Last release
3 years ago

Merica

An easy way to get state names and abbreviations for the beautiful US of A.

Getting started

npm install merica or yarn add merica

import * as merica from 'merica';
// OR
import { states, abbreviationToFullName } from 'merica';

Types

All Options:

  • abbreviationToFullName
  • fullNameToAbbreviation
  • abbreviations
  • states
  • getAbbreviation
  • getFullName

Objects:

  • abbreviationToFullName
  • fullNameToAbbreviation

Lists

  • abbreviations
  • states

Methods:

  • getAbbreviation Given a state's full name, returns a state's two letter abbreviation.

Example:

  const abbrev = getAbbreviation('California'); // CA
  • getFullName Given a state's two letter abbreviation, returns the state's full name. Example:
  const fullName = getFullName('CA'); // California