 
 (defn ns-form? [form]
   (and (seq? form) (= 'ns (first form))))
+
+(defn extract-namespace
+  [source]
+  (let [first-form (repl-read-string source)]
+    (when (ns-form? first-form)
+      (second first-form))))
 
 (def special-doc-map
   '{.     {:forms [(.instanceMethod instance args*)

        (-> (r/read {:read-cond :allow :features #{:cljs}} rdr)
          meta :source)))))

(defn execute-source
  [[source-type source-value] {:keys [expression? print-nil-expression? in-exit-context? include-stacktrace?] :as opts}]
  (binding [ana/*cljs-ns* @current-ns

; file here is an alternate parameter denoting a filesystem path
(defn load [{:keys [name macros path file] :as full} cb]
  (if file
    (when-not (load-and-callback! file :clj :calculate-cache-prefix cb)
      (cb nil))
    (if (re-matches #"^goog/.*" path)
      (if-let [goog-path (get (closure-index-mem) name)]
