# 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

# Examples
* 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 + 10
```

* `Console.warn`
```
checkApiResponse : 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 currentData
```

* `Console.error`
```
toValidMonth : Int -> Result Int Int
toValidMonth month =
    if month >= 1 && month <= 12
        then Ok month
        else Console.error "invalid month" month |> Err
```

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

update : ...
update ... = 
    let
        timeCheck =  Console.timeLog "updates" ()
```

