mirror of
https://github.com/penpot/penpot.git
synced 2025-05-02 01:56:21 +02:00
♻️ Apply transducer-fu
This commit is contained in:
parent
b2fef7b7a8
commit
ebc79c278b
1 changed files with 4 additions and 4 deletions
|
@ -410,10 +410,10 @@
|
||||||
"Decompose a string in the form 'one / two / three' into
|
"Decompose a string in the form 'one / two / three' into
|
||||||
a vector of strings, normalizing spaces."
|
a vector of strings, normalizing spaces."
|
||||||
[path]
|
[path]
|
||||||
(->> (str/split path "/")
|
(let [xf (comp (map str/trim)
|
||||||
(map str/trim)
|
(remove str/empty?))]
|
||||||
(remove str/empty?)
|
(->> (str/split path "/")
|
||||||
vec))
|
(into [] xf))))
|
||||||
|
|
||||||
(defn join-path
|
(defn join-path
|
||||||
"Regenerate a path as a string, from a vector."
|
"Regenerate a path as a string, from a vector."
|
||||||
|
|
Loading…
Add table
Reference in a new issue