seq-to-map-for-destructuring

functionsince v1.11.50Edit
(seq-to-map-for-destructuring s)

Source docstring:
Builds a map from a seq as described in
https://clojure.org/reference/special_forms#keyword-arguments
Source code @ clojurescript:src/main/cljs/cljs/core.cljs
(defn seq-to-map-for-destructuring
  [s]
  (if (next s)
    (.createAsIfByAssoc PersistentArrayMap (to-array s))
    (if (seq s) (first s) (.-EMPTY PersistentArrayMap))))