This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
We were not able to find the expected elm-package.json file at this tag.
Tag 2.0.0
Committed At 2018-09-18 12:28:54 UTC




    Manage values that expire after a period of time.


    import Expirable exposing (Expirable)
    type alias Model =
        { toastMessages : List (Expirable String)
    type Msg
        = DecrementToastMessages Time.Posix
    initial : Model
    initial =
        { toastMessages =
            [ (Expirable.seconds 5) "Hi there"
            , (Expirable.seconds 30) "This goes longer"
    subscriptions : Model -> Sub Msg
    subscriptions model =
        Expirable.subscription DecrementToastMessages
    update : Msg -> Model -> ( Model, Cmd Msg )
    update msg model =
        case msg of
            DecrementToastMessages time ->
                ( { model
                    | toastMessages = Expirable.tickAll time model.toastMessages
                , Cmd.none


    To set up a working development environment, run:


    Ensure that this project's node_modules/.bin is at the beginning of your $PATH, ensuring that any local NPM packages have the highest priority.

    To ensure the package compiles:

    yarn build

    To run tests:

    yarn test


    See the LICENSE file.

    About thoughtbot


    Expirable is maintained and funded by thoughtbot, inc. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

    We love open source software! See our other projects or hire us to design, develop, and grow your product.