This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
1.0.0
We were not able to find the expected elm-package.json file at this tag.
Tag 1.0.1
Committed At 2020-03-18 17:24:00 UTC

Modules

    README

    elm-luhn

    Validate numbers using the Luhn algorithm. Can be used when writing e.g. validators for credit cards or other numbers that use the Luhn algorithm for basic validation.

    Installation

    elm-package install ahstro/elm-luhn
    

    Usage

    import Luhn
    
    if Luhn.isValid "1234567812345670"
      "Yay"
    else
      "Nay"
    
    
    case Luhn.validate "1234567812345670" of
        Ok numberString ->
            numberString ++ " is valid" -- "1234567812345670 is valid"
        Err error ->
            error
    

    More examples are available in the /tests folder.