m-mullins/elm-console/1.0.0

NOTE: the latest version is 1.0.1

Unavailable. Nobody can download this version any more, with elm or with the Lamdera compiler: github.com/m-mullins/elm-console is gone (deleted or private); Software Heritage has not archived the repo; no fork with tag 1.0.0 found (17 same-name repos checked); no cached copy. Use another version.

Details

ELM Console

Wrap JS console in an elm module.

  • Used for testing out 0.19 native modules.
  • Requires modified 0.19.0 elm compiler for native modules

Example

init : ...
init ... =
    let
        timeInit = Console.time "updates" ()

update : ...
update ... = 
    let
        timeCheck =  Console.timeLog "updates" ()
addTen : Int -> Int
addTen arg =
    let
        p = Console.warn "In myfunc" <| (arg + 10)
    in
        p
toValidMonth : Int -> Result Int Int
toValidMonth month =
    if month >= 1 && month <= 12
        then Ok month
        else Console.error "invalid month" month |> Err