Skip to content

Commit

Permalink
Sort app-db with clj-arrangement
Browse files Browse the repository at this point in the history
  • Loading branch information
kimo-k committed Oct 31, 2023
1 parent 22645ac commit f6a6af7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]

Expand Down
10 changes: 4 additions & 6 deletions src/day8/re_frame_10x/tools/datafy.cljs
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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]
Expand Down

0 comments on commit f6a6af7

Please sign in to comment.