Skip to content

Commit e294ccf

Browse files
committed
Sort app-db with clj-arrangement
For #406
1 parent 22645ac commit e294ccf

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

project.clj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
[com.yahoo.platform.yui/yuicompressor "2.4.8"
1212
:exclusions [rhino/js]]
1313
[zprint "1.2.7"]
14+
[mvxcvi/arrangement "2.1.0"]
1415
[org.clojure/tools.logging "1.2.4"]
1516
[rewrite-clj/rewrite-clj "1.1.47"]]
1617

src/day8/re_frame_10x/tools/datafy.cljs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
(ns day8.re-frame-10x.tools.datafy
22
(:require [clojure.string :as str]
33
[clojure.walk :as walk]
4-
[day8.re-frame-10x.inlined-deps.re-frame.v1v3v0.re-frame.loggers :refer [console]]))
4+
[day8.re-frame-10x.inlined-deps.re-frame.v1v3v0.re-frame.loggers :refer [console]]
5+
[arrangement.core :as order]))
56

67
(defn keyboard-event [e]
78
{:key (.-key e)
@@ -31,11 +32,8 @@
3132

3233
(defn deep-sorted-map [m]
3334
(walk/postwalk
34-
#(if (map? %)
35-
(try (into (sorted-map) %)
36-
(catch :default _
37-
(do (console :warn "Warning: map has unsortable keys: " %) %)))
38-
%)
35+
#(cond->> %
36+
(map? %) (into (sorted-map-by order/rank)))
3937
m))
4038

4139
(defn alias [k ns->alias]

0 commit comments

Comments
 (0)