Skip to content

Commit

Permalink
Document Ui.Utils.Env.
Browse files Browse the repository at this point in the history
  • Loading branch information
gdotdesign committed Jan 19, 2016
1 parent ac5ffda commit c6cedb2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion elm-package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"Ui.Helpers.Drag",
"Ui.Helpers.Animation",
"Ui.Helpers.Dropdown",
"Ui.Helpers.Intendable"
"Ui.Helpers.Intendable",
"Ui.Utils.Env"
],
"dependencies": {
"circuithub/elm-number-format": "1.0.2 <= v < 2.0.0",
Expand Down
6 changes: 6 additions & 0 deletions source/Ui/Utils/Env.elm
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
module Ui.Utils.Env where

{-| Module for interacting with the environment variables.
@docs get
-}
import Json.Decode as Json
import Native.Env
import Debug

{-| Gets the value of the given environment variable with a decoder and a
default value. -}
get : String -> a -> Json.Decoder a -> a
get key default decoder =
let
Expand Down

0 comments on commit c6cedb2

Please sign in to comment.