Skip to content

Commit

Permalink
chore: refactor ->bignumbers to use not use varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
seanstrom committed Sep 24, 2024
1 parent 94162f1 commit 0a6252c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/utils/money.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@
(if (bignumber? n) n (bignumber n)))

(defn ->bignumbers
[& nums]
(let [bignums (map ->bignumber nums)]
(when (every? bignumber? bignums)
bignums)))
[n1 n2]
(when-let [bn1 (->bignumber n1)]
(when-let [bn2 (->bignumber n2)]
(when (and (bignumber? bn1) (bignumber? bn2))
[bn1 bn2]))))

(defn greater-than-or-equals
[^js n1 ^js n2]
Expand Down

0 comments on commit 0a6252c

Please sign in to comment.