mirror of
https://github.com/logseq/logseq.git
synced 2026-04-24 22:25:01 +00:00
chore: remove fn remove-nils
This commit is contained in:
12
deps/common/src/logseq/common/util.cljs
vendored
12
deps/common/src/logseq/common/util.cljs
vendored
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user