Skip to content

Commit

Permalink
Merge pull request #268 from saidone75/dev
Browse files Browse the repository at this point in the history
remove trailing commas
  • Loading branch information
saidone75 authored May 16, 2024
2 parents 98565df + d327600 commit 3fd5d27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/cral/utils/utils.clj
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
(cral.model.auth Ticket)
(java.util Base64)))

(defn- clean
[s]
(str/replace s #"^:+" ""))

(defn kebab-case
"Turn a camelCase string into kebab-case."
[s]
Expand All @@ -45,7 +49,7 @@

(defn- *-keywordize-keys
[m *-case]
(let [f (fn [[k v]] [(keyword (*-case k)) v])]
(let [f (fn [[k v]] [(keyword (*-case (clean k))) v])]
;; only apply to maps
(walk/postwalk (fn [x] (if (map? x) (into {} (map f x)) x)) m)))

Expand Down

0 comments on commit 3fd5d27

Please sign in to comment.