function | since v0.0-927 | clojure.core/integer? | Edit |
(integer? n)
Returns true if n
is an integer, false otherwise.
Returns true if n is a JavaScript number with no decimal part.
(defn integer?
[n]
(and (number? n)
(not ^boolean (js/isNaN n))
(not (identical? n js/Infinity))
(== (js/parseFloat n) (js/parseInt n 10))))