     (keyword? value) (keyword-template value)
     (symbol? value) (symbol-template value)
     (fn? value) (fn-template value)
-    (satisfies? IDeref value) (deref-template value)
-    ))
+    (deref? value) (deref-template value)))
 
 (defn header-container-template [value]
   (cond
     (map? value) (header-map-template value)
     (set? value) (header-set-template value)
     (seq? value) (header-seq-template value)
-    (coll? value) (header-coll-template value)
-    ))
+    (coll? value) (header-coll-template value)))
 
 (defn inlined-value-template [value]
   (or (atomic-template value)


(def max-coll-elements 10)
(def max-map-elements 5)
(def max-set-elements 7)
(def max-seq-elements 20)
(def abbreviation "…")
(def line-index-separator ":")
(def formatter-key "devtoolsFormatter")
(def dq "\"")

(def ^:dynamic *devtools-enabled* true)
(def ^:dynamic *devtools-installed* false)
(def ^:dynamic *original-formatter* nil)

(declare inlined-value-template)

; dirty
(defn cljs-value? [value]
  (or (exists? (aget value "meta"))
      (exists? (aget value "_meta"))

      (pr-str value)))

(defn build-header [value]
  (template span "background-color:#efe" (header-template value)))

(defn body-line-template [index value]
  (template li standard-li-style (index-template index) spacer (inlined-value-template value)))

(defn body-line-templates [value]
  (loop [data (seq value) ; TODO: limit max number of lines here?
         index 0
         lines []]
    (if (empty? data)
      lines
      (recur (rest data) (inc index) (conj lines (body-line-template index (first data)))))))

(defn build-body [value]
  (template ol standard-ol-style (body-line-templates value)))

(defn something-abbreviated? [value]
  (if (coll? value)
