ns-publics

macrosince v1.9.854 clojure.core/ns-publicsEdit
(ns-publics quoted-ns)

Source docstring:
Returns a map of the public intern mappings for the namespace.
Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(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])))])))