chore: remove fn remove-nils

This commit is contained in:
Tienson Qin
2025-10-15 17:26:29 +08:00
parent 8d0c2f9887
commit 3244b6d599

View File

@@ -6,7 +6,6 @@
[cljs.reader :as reader]
[clojure.edn :as edn]
[clojure.string :as string]
[clojure.walk :as walk]
[goog.string :as gstring]
[logseq.common.log :as log]))
@@ -24,17 +23,6 @@
[s]
(.normalize s "NFC"))
(defn remove-nils
"remove pairs of key-value that has nil value from a (possibly nested) map or
coll of maps."
[nm]
(walk/postwalk
(fn [el]
(if (map? el)
(into {} (remove (comp nil? second)) el)
el))
nm))
(defn remove-nils-non-nested
"remove pairs of key-value that has nil value from a map (nested not supported)."
[nm]