This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
Konami Code thingy
version 1.0.0
license BSD3
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.0
Committed At 2018-02-23 15:16:31 UTC
elm-lang/keyboard 1.0.1 <= v < 2.0.0 1.0.1
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1

Modules

README

elm-konami-code

Use the Konami Code to do awesome (or boring) stuff on your website.

Installation

elm-package install ahstro/elm-konami-code

Usage

import KonamiCode exposing (KonamiCode)

type alias Model =
    { konamiCode : KonamiCode
    }

type Msg
    = KonamiCodeMsg KonamiCode.Msg

init : ( Model, Cmd Msg )
init =
    ( { konamiCode = KonamiCode.init }
    , Cmd.none
    )

update : Msg -> Model -> ( Model, Cmd Msg )
update msg model =
    case msg of
        KonamiCodeMsg msg ->
            let
                ( newModel, konamiCodeEntered ) =
                    KonamiCode.update msg model
            in
            ( { newModel
                | showEasterEgg =
                    model.showEasterEgg || konamiCodeEntered
              }
            , Cmd.none
            )

subscriptions : Model -> Sub Msg
subscriptions model =
    KonamiCode.subscribe KonamiCodeMsg