Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Commit 57bc81c

Browse files
committed
added grain docs to env functions
Signed-off-by: Matt Butcher <matt.butcher@microsoft.com>
1 parent 388ac82 commit 57bc81c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

env.gr

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ import String from "string"
55
import Option from "option"
66

77
// Split an environment variable at the first equals sign.
8+
// @param item: An environment variable pair, separated by an equals sign (=).
9+
// @return (String, String) A tuple key/value pair.
810
let splitEnvVar = (item) => {
911
let offsetOpt = String.indexOf("=", item)
1012

@@ -16,6 +18,9 @@ let splitEnvVar = (item) => {
1618
(key, val)
1719
}
1820

21+
// Get the environment variables as a Map<String, String>
22+
//
23+
// @return Map<String, String> A map of all environment variables.
1924
export let envMap = () => {
2025
let parsed = Map.make()
2126
let env = Process.env()

0 commit comments

Comments
 (0)