 (defn js-value? [value]
   (not (cljs-value? value)))
 
+(defn surrogate? [value]
+  (exists? (aget value "__surrogate")))
+
 (defn template [tag style & more]
   (let [arr #js [tag (if (empty? style) #js {} #js {"style" style})]]
     (doseq [o more]

      (.push arr o))
    arr))

(defn spacer [& _] " ")

(defn nil-template [_]

        items (header-inlined-templates value renderer max-coll-elements)]
    (template "span" "color:#000" "[" items "]")))

(defn bool-template [value]
  (template "span" "color:#099" value))

(defn generic-template [value]
  (template "span" "color:#000" (reference value)))

(defn js-object-template [value]
  (if (js-value? value)
    (template "span" "color:#000" (reference (surrogate value "#js")))))

(defn bool? [value]
  (or (true? value) (false? value)))

(defn atomic-template [value]
  (cond
    (nil? value) (nil-template value)
    (bool? value) (bool-template value)
    (string? value) (string-template value)
    (number? value) (number-template value)
    (keyword? value) (keyword-template value)
