Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 5090de2abb
Fetching contributors…

Cannot retrieve contributors at this time

17 lines (15 sloc) 0.578 kb
(ns one.repmax.util)
; clj->js is from Chris Granger's excellent fetch library
(defn- clj->js
"Recursively transforms ClojureScript maps into Javascript objects,
other ClojureScript colls into JavaScript arrays, and ClojureScript
keywords into JavaScript strings."
(string? x) x
(keyword? x) (name x)
(map? x) (.-strobj (reduce (fn [m [k v]]
(assoc m (clj->js k) (clj->js v))) {} x))
(coll? x) (apply array (map clj->js x))
:else x))
Jump to Line
Something went wrong with that request. Please try again.