atom-beautify/examples/simple-jsbeautifyrc/clojure/original/test.clj

17 lines
554 B
Clojure
Raw Permalink Normal View History

2016-09-03 19:26:54 -06:00
(defn reformat-form
[form & [{:as opts}]]
(-> form
(cond-> (:remove-consecutive-blank-lines? opts true)
remove-consecutive-blank-lines)
(cond-> (:remove-surrounding-whitespace? opts true)
remove-surrounding-whitespace)
(cond-> (:insert-missing-whitespace? opts true) insert-missing-whitespace)
(cond-> (:indentation? opts true)
(reindent (:indents opts default-indents)))
(cond-> (:remove-trailing-whitespace? opts true)
remove-trailing-whitespace)))