function | since v0.0-1443 | Edit |
(obj-map & keyvals)
keyval => key val Returns a new object map with supplied mappings.
(defn obj-map
[& keyvals]
(let [ks (array)
obj (js-obj)]
(loop [kvs (seq keyvals)]
(if kvs
(do (.push ks (first kvs))
(gobject/set obj (first kvs) (second kvs))
(recur (nnext kvs)))
(.fromObject ObjMap ks obj)))))