 (defn build-prototype [namespace prototype]
   (when (seq prototype)
     (str namespace ".prototype = {" (string/join "," (for [p prototype]
-                                                               (build-function (:name p)))) "};")))
+                                                       (build-function (:name p)))) "};")))
 
 (defn build-prototype-extern [obj namespace]
   (let [{:keys [name props prototype]} obj


      :else
      (let [props-extern (str "{" (string/join "," (for [p props]
                                                             (build-props-extern p))) "}")]
        (if (get obj :top)
          (str "var " name "=" props-extern ";")
          (str (quote-string name) ":" props-extern))))))

(defn build-tree [obj name]
  {:name name
   :type (get-type obj)
   :props (for [k (js-keys obj)
                :let [child (aget obj k)]]
            (if (and (parent-type? child)
                     (not (identical? obj child)))
              (build-tree child k)
              {:name k :type (get-type child)}))
   :prototype (for [k (js-keys (.-prototype obj))]
                {:name k :type :function})})

(defn build-function [name]
  (str (quote-string name) ": function () {}"))
