user progress
This commit is contained in:
@@ -622,3 +622,17 @@
|
||||
second
|
||||
base64/decodeString)]
|
||||
(js->clj (.parse js/JSON json) :keywordize-keys true)))
|
||||
|
||||
(defn coerce-float [f]
|
||||
(cond (str/blank? f)
|
||||
nil
|
||||
|
||||
(float? f)
|
||||
f
|
||||
|
||||
(and (string? f)
|
||||
(not (js/Number.isNaN (js/parseFloat f))))
|
||||
(js/parseFloat f)
|
||||
|
||||
:else
|
||||
nil))
|
||||
|
||||
Reference in New Issue
Block a user