KC
Size: a a a
KC
T
T
KC
KC
(defmethod excel-number :string [s]
(try
(let [n (when (not-empty s)
(#?(:clj edn/read-string
:cljs js/Number) s))]
(if (and (number? n) #?@(:cljs [(not (js/isNaN n)) (not= js/Infinity n) (not= (* -1 js/Infinity) n)]))
n
(throw (ex-info (str "Fail to coerce `" s "` to number.")
{:type :argument-type}))))
(catch #?(:clj Throwable
:cljs js/Error) _
(throw (ex-info (str "Fail to coerce `" s "` to number.")
{:type :argument-type})))))
T
T
infinite?
(а в кложе нет)KC
T
(try-parse-int "1blahblah")
;; clj => nil
;; cljs => 1
a
T
OR
radix
опытным путём добавишь, если ещё нет.T
T
#?
?T
KC
radix
опытным путём добавишь, если ещё нет.