Add missing srepl helper for disable objects-map feat

This commit is contained in:
Andrey Antukh 2025-09-30 13:49:30 +02:00
parent 62563d28d0
commit 9f2dc06c95
1 changed files with 14 additions and 0 deletions

View File

@ -49,6 +49,20 @@
(update :data update-data)
(update :features conj "fdata/objects-map"))))
(defn disable-objects-map
[file & _opts]
(let [update-page
(fn [page]
(update page :objects #(into {} %)))
update-data
(fn [fdata]
(update fdata :pages-index d/update-vals update-page))]
(-> file
(update :data update-data)
(update :features disj "fdata/objects-map"))))
(defn process-objects
"Apply a function to all objects-map on the file. Usualy used for convert
the objects-map instances to plain maps"