Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ClojureScript read env in NodeJS
(defn -js->clj+
"For cases when built-in js->clj doesn't work. Source:"
(into {} (for [k (js-keys x)]
[k (aget x k)])))
(defn env
"Returns current env vars as a Clojure map."
(-js->clj+ (.-env js/process)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment