js-str

macrosince v0.0-2341Edit
(js-str s)

Details:

Convert s to string using JavaScript's coercion behavior.

Equivalent to ''+s in JavaScript.


Examples:

(js-str 23)
;;=> "23"

(js-str #js {:foo 1})
;;=> "[Object object]"

See Also:


Source code @ clojurescript:src/main/clojure/cljs/core.cljc
(core/defmacro js-str [s]
  (core/list 'js* "''+~{}" s))