find-ns-obj
function | since v1.7.10 | Edit |
(find-ns-obj ns)
Source docstring:
Bootstrap only.
(defn find-ns-obj
[ns]
(let [munged-ns (munge (str ns))
segs (.split munged-ns ".")]
(case *target*
"nodejs" (if ^boolean js/COMPILED
(find-ns-obj*
(try
(let [ctxt (js/eval (first segs))]
(when (and ctxt (object? ctxt))
ctxt))
(catch js/ReferenceError e
nil))
(next segs))
(find-ns-obj* goog/global segs))
("default" "webworker") (find-ns-obj* goog/global segs)
(throw (js/Error. (str "find-ns-obj not supported for target " *target*))))))