function | since v1.7.10 | Edit |
(ns-interns* sym)
Returns a map of the intern mappings for the namespace. Bootstrap only.
(defn ns-interns*
[sym]
(let [ns-obj (find-ns-obj sym)
ns (Namespace. ns-obj sym)]
(letfn [(step [ret k]
(let [var-sym (symbol (demunge k))]
(assoc ret
var-sym (Var. #(gobject/get ns-obj k)
(symbol (str sym) (str var-sym)) {:ns ns}))))]
(reduce step {} (js-keys ns-obj)))))