     (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"))

        (call-original-formatter? value)))))

(defn cljs-formatter [original-formatter]
  (let [hook-wrapper (fn [name hook] (debug/hook-monitor name (chain name original-formatter (sanitize hook))))]
    (js-obj
      "header" (hook-wrapper "header" header-hook)
      "hasBody" (hook-wrapper "hasBody" has-body-hook)
      "body" (hook-wrapper "body" body-hook))))

(defn install-devtools! []
  (if *devtools-installed*
