macro | since v0.0-2496 | clojure.core/ns-interns | Edit |
(ns-interns quoted-ns)
Returns a map of the intern mappings for the namespace.
(core/defmacro ns-interns
[quoted-ns]
(core/assert (core/and (seq? quoted-ns)
(= (first quoted-ns) 'quote)
(core/symbol? (second quoted-ns)))
"Argument to ns-interns must be a quoted symbol")
(core/let [ns (second quoted-ns)]
`(into {}
[~@(map
(core/fn [[sym _]]
`[(symbol ~(name sym)) (var ~(symbol (name ns) (name sym)))])
(get-in @env/*compiler* [:cljs.analyzer/namespaces ns :defs]))])))