Rewrite-edn: utility lib on top of rewrite-clj with common operations to update EDN while preserving whitespace and comments.
assoc
/update
now handles map keys that have no indent at all (@lread)assoc
/update
now handles map keys that have no indent at all
(@lread)assoc
/update
now aligns indent to comment if that's all that is in the map
(@lread)update
now indents new entries in same way as assoc
(@lread)assoc-in
assoc
on map starting with commentconj
: (str (r/update (r/parse-string "{:a [1 2 3]}") :a r/conj 1)) ;;=> "{:a [1 2 3 1]}"
(@zerg000000)fnil
: (str (r/update (r/parse-string "{:a [1 2 3]}") :b (r/fnil r/conj []) 1)) ;;=> "{:a [1 2 3] :b [1]}"
assoc-in
, assoc
no longer throw NullPointerException
(@lread)keys
and get-in
(@witek)get
assoc
map-vals
to map-keys
assoc-in
Initial release
Can you improve this documentation? These fine people already did:
Michiel Borkent, Lee Read, Albert Lai & Witoslaw KoczewskiEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close