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.1 found (17 same-name repos checked); no cached copy. Use another version.
Wrap JS console in an elm module.
Not sure if any of these examples actually make sense,
Ideally we should be striving to have code that does not have state that require logging?
Console.log
addTen : Int -> Int
addTen arg =
let
_ = Console.log ("In myfunc" String.fromInt arg) arg
in
p + 10Console.warncheckApiResponse : Data -> Int -> Data -> Data
checkApiResponse currentData status newData =
case status of
200 -> newData
_ ->
let
warnStr = "Unexpected api response: " ++ String.fromInt s
in
Console.warn warnStr currentDataConsole.errortoValidMonth : Int -> Result Int Int
toValidMonth month =
if month >= 1 && month <= 12
then Ok month
else Console.error "invalid month" month |> ErrConsole.timeinit : ...
init ... =
let
timeInit = Console.time "updates" ()
update : ...
update ... =
let
timeCheck = Console.timeLog "updates" ()