function | since v0.0-1211 | clojure.core/into-array | Edit |
(into-array aseq)
(into-array type aseq)
Returns a new JavaScript array from the elements of aseq
.
Returns an array with components set to the values in aseq. Optional type argument accepted for compatibility with Clojure.
(defn ^array into-array
([aseq]
(into-array nil aseq))
([type aseq]
(reduce (fn [a x] (.push a x) a) (array) aseq)))