Adds synchronization for typography

This commit is contained in:
alonso.torres 2020-09-30 18:46:10 +02:00 committed by Hirunatan
parent 718a676fa8
commit 7248b168fa
3 changed files with 167 additions and 96 deletions

View file

@ -0,0 +1,11 @@
(ns app.util.text)
(defn some-node
[predicate node]
(or (predicate node)
(some #(some-node predicate %) (:children node))))
(defn map-node
[map-fn node]
(cond-> (map-fn node)
(:children node) (update :children (fn [children] (mapv #(map-node map-fn %) children)))))