      :cljs (when (isa? js/Date (type date))
              (.getTime date))))
 
+(def date? (comp not nil? ->epoch-millis))
+
 (defn dedup
   [xs]
   (second (reduce (fn [[seen?, deduped] x]

(ns gyptis.util
  #?(:clj
     (:require [clojure.data.json :as json]
               [clj-time.format :as f])))

(defn merge-spec
  "Similar to how leiningen merges profiles:

  ([k m]
   (ensure-key k nil m)))

(defn ->epoch-millis
  "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."
