gyptis.util

->epoch-millis

(->epoch-millis date)
Takes a java.util.Date or joda DateTime or js/Date
instance and returns milliseconds since UNIX epoch. Returns a nil if passed none of those.

->json

(->json x)
Converts clojure datastructure to json

date?

(date? x)

dedup

(dedup xs)

ensure-key

(ensure-key k default m)(ensure-key k m)
assocs a val of nil to the given key if the map doesn't contain key

merge-spec

(merge-spec a b)(merge-spec a b & more)
Similar to how leiningen merges profiles:
keys are assoc'd, vectors are appended, sets are unioned.
:replace metadata on b causes the contents of b to completely override a.