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 2018-08-31 12:55:26 UTC

Modules

    README

    elm-compare

    DSL for creating comparison functions in Elm.

    Usage

    Install the package:

    elm package install TSFoster/elm-compare
    

    Comparing records:

    import Compare exposing (thenBy, thenByReverse, ascending, descending)
    
    winner =
        let
            compare : Player -> Player -> Basics.Order
            compare =
                Compare.by .pokerSkill thenBy .cardShufflingAbility ascending
        in
            case compare player opponent of
                EQ ->
                    Nothing
                LT ->
                    Just opponent
                GT ->
                    Just player
    
    
    rankings =
        List.sortWith
            (Compare.with rockPaperScissors thenBy .age descending)
            allPlayers
    
    
    addressBook =
        List.sortWith
            (Compare.by .lastName thenBy .firstName thenByReverse .dateOfBirth ascending)
            allContacts
    

    For full documentation, see package.elm-lang.org.

    Tests

    git clone https://github.com/TSFoster/elm-compare.git
    cd elm-compare
    elm-test
    npm install -g elm-doc-test && elm-doc-test && elm-test tests/Doc/Main.elm
    

    License

    MIT