0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-10 00:40:30 -05:00

♻️ Apply transducer-fu

This commit is contained in:
Andrés Moya 2021-05-31 13:15:42 +02:00
parent b2fef7b7a8
commit ebc79c278b

View file

@ -410,10 +410,10 @@
"Decompose a string in the form 'one / two / three' into
a vector of strings, normalizing spaces."
[path]
(let [xf (comp (map str/trim)
(remove str/empty?))]
(->> (str/split path "/")
(map str/trim)
(remove str/empty?)
vec))
(into [] xf))))
(defn join-path
"Regenerate a path as a string, from a vector."