function | since v0.0-1798 | Edit |
(array? x)
Returns true if x
is a JavaScript array, false otherwise.
(array? #js [1 2 3])
;;=> true
(array? [1 2 3])
;;=> false
(array? "hi")
;;=> false
Returns true if x is a JavaScript array.
(defn ^boolean array?
[x]
(if (identical? *target* "nodejs")
(.isArray js/Array x)
(instance? js/Array x)))