cljs.repl/eval-cljs

functionsince v1.10.63Edit
(eval-cljs repl-env env form)
(eval-cljs repl-env env form opts)

Source docstring:
Given a REPL evaluation environment, an analysis environment, and a
form, evaluate the form and return the result. The result is always the value
represented as a string.
Source code @ clojurescript:src/main/clojure/cljs/repl.cljc
(defn eval-cljs
  ([repl-env env form]
    (eval-cljs repl-env env form *repl-opts*))
  ([repl-env env form opts]
   (evaluate-form repl-env
     (assoc env :ns (ana/get-namespace ana/*cljs-ns*))
     ""
     form
     ;; the pluggability of :wrap is needed for older JS runtimes like Rhino
     ;; where catching the error will swallow the original trace
     ((or (:wrap opts) wrap-fn) form)
     opts)))