        was-visited)
      (let [out (array)]
        (swap! visited assoc obj out)
-       (array-append out (map #(->js % flat visited) obj)))))
+       (doseq [elem obj]
+         (.push out (->js elem flat visited)))
+       out)))
 
   ([obj flat] (seq->js obj flat (atom {})))
   ([obj] (seq->js obj false (atom {}))))

       was-visited)
     (let [out (js-obj)]
       (swap! visited assoc obj out)
       (dorun
        (map
         #(let [key %
                val (->js (aget obj %) flat visited)]
            (aset out key val))
         (.keys js/Object obj)))
       out)))

  ([obj flat] (ns->js obj flat (atom {})))

(defn obj-size [obj]
  (count (filter #(.hasOwnProperty obj %) (.keys js/Object obj))))

;;***************************************************************************
;; ->js
;;***************************************************************************
