https://github.com/chadtech/elm-us-state-abbreviations
US State abbreviations and helper functions for those
https://github.com/chadtech/elm-us-state-abbreviations
Last synced: 10 months ago
JSON representation
US State abbreviations and helper functions for those
- Host: GitHub
- URL: https://github.com/chadtech/elm-us-state-abbreviations
- Owner: Chadtech
- License: other
- Created: 2017-04-08T23:55:00.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-25T15:39:16.000Z (almost 8 years ago)
- Last Synced: 2025-04-13T16:46:14.632Z (about 1 year ago)
- Language: Elm
- Homepage:
- Size: 6.84 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Elm US State Abbreviations
A simple Elm package for US State abbreviations.
```elm
import UsStates exposing (Abbreviation(..))
UsStates.fromString : String -> Maybe Abbreviation
UsStates.toString : Abbreviation -> String
UsStates.fromString " arizona" == Just AZ -- True
UsStates.toString AZ == "arizona" -- True
UsStates.all == [ AL, AK, AZ, AR, CA, ... ]
```