Skip to main content

clj->js

functionv1.7

cljs.core/clj->js

(clj->js [x & {:keys [keyword-fn], :or {keyword-fn name}, :as options}])
Recursively transforms ClojureScript values to JavaScript. sets/vectors/lists become Arrays, Keywords and Symbol become Strings, Maps become Objects. Arbitrary keys are encoded to by `key->js`. Options is a key-value pair, where the only valid key is :keyword-fn, which should point to a single-argument function to be called on keyword keys. Default to `name`.

No examples yet. Be the first to add one!