diff --git a/project.clj b/project.clj index 7a646154..1329bd6f 100644 --- a/project.clj +++ b/project.clj @@ -11,6 +11,7 @@ [com.yahoo.platform.yui/yuicompressor "2.4.8" :exclusions [rhino/js]] [zprint "1.2.7"] + [mvxcvi/arrangement "2.1.0"] [org.clojure/tools.logging "1.2.4"] [rewrite-clj/rewrite-clj "1.1.47"]] diff --git a/src/day8/re_frame_10x/tools/datafy.cljs b/src/day8/re_frame_10x/tools/datafy.cljs index 84791370..d247525a 100644 --- a/src/day8/re_frame_10x/tools/datafy.cljs +++ b/src/day8/re_frame_10x/tools/datafy.cljs @@ -1,7 +1,8 @@ (ns day8.re-frame-10x.tools.datafy (:require [clojure.string :as str] [clojure.walk :as walk] - [day8.re-frame-10x.inlined-deps.re-frame.v1v3v0.re-frame.loggers :refer [console]])) + [day8.re-frame-10x.inlined-deps.re-frame.v1v3v0.re-frame.loggers :refer [console]] + [arrangement.core :as order])) (defn keyboard-event [e] {:key (.-key e) @@ -31,11 +32,8 @@ (defn deep-sorted-map [m] (walk/postwalk - #(if (map? %) - (try (into (sorted-map) %) - (catch :default _ - (do (console :warn "Warning: map has unsortable keys: " %) %))) - %) + #(cond->> % + (map? %) (into (sorted-map-by order/rank))) m)) (defn alias [k ns->alias]