function | since v0.0-927 | Edit |
(array-seq array)
(array-seq array i)
Creates a seq
from a JavaScript array or array-like object, starting at index i
if given.
(array-seq #js [1 2 3])
;;=> (1 2 3)
(array-seq #js [1 2 3] 1)
;;=> (2 3)
Also works on Array-like objects, like NodeList.
(array-seq (js/document.querySelectorAll "div"))
;;=> ...
Create a seq from a JavaScript array.
(defn array-seq
([array]
(prim-seq array 0))
([array i]
(prim-seq array i)))