key->js

functionsince v0.0-1798Edit
(key->js k)
(key->js k primitive-fn)

Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn key->js
  ([k] (key->js k clj->js))
  ([k primitive-fn]
   (cond
     (satisfies? IEncodeJS k) (-clj->js k)
     (or (string? k)
         (number? k)
         (keyword? k)
         (symbol? k)) (primitive-fn k)
     :default (pr-str k))))