mirror of
https://github.com/penpot/penpot.git
synced 2026-02-12 22:53:02 +00:00
♻️ Apply transducer-fu
This commit is contained in:
@@ -410,10 +410,10 @@
|
||||
"Decompose a string in the form 'one / two / three' into
|
||||
a vector of strings, normalizing spaces."
|
||||
[path]
|
||||
(->> (str/split path "/")
|
||||
(map str/trim)
|
||||
(remove str/empty?)
|
||||
vec))
|
||||
(let [xf (comp (map str/trim)
|
||||
(remove str/empty?))]
|
||||
(->> (str/split path "/")
|
||||
(into [] xf))))
|
||||
|
||||
(defn join-path
|
||||
"Regenerate a path as a string, from a vector."
|
||||
|
||||
Reference in New Issue
Block a user