js-on-sx: js-num-to-int coerces strings via js-to-number
This commit is contained in:
@@ -1392,7 +1392,11 @@
|
||||
|
||||
(define
|
||||
js-num-to-int
|
||||
(fn (n) (if (>= n 0) (floor n) (- 0 (floor (- 0 n))))))
|
||||
(fn
|
||||
(v)
|
||||
(let
|
||||
((n (if (number? v) v (js-to-number v))))
|
||||
(if (>= n 0) (floor n) (- 0 (floor (- 0 n)))))))
|
||||
|
||||
(define dict-has? (fn (d k) (contains? (keys d) k)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user