ns-publics
(ns-publics quoted-ns)
Source docstring:
Returns a map of the public intern mappings for the namespace.
(core/defmacro ns-publics
[quoted-ns]
(core/assert (core/and (seq? quoted-ns)
(= (first quoted-ns) 'quote)
(core/symbol? (second quoted-ns)))
"Argument to ns-publics 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)))])
(filter (core/fn [[_ info]]
(not (core/-> info :meta :private)))
(get-in @env/*compiler* [:cljs.analyzer/namespaces ns :defs])))])))