Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
augustl
· 10y ago · 0 comments
That's interesting. JavaScript has enough quirks to warrant an is-positive-integer module.
Comments
[–]
plugnburn
10y ago
See:
isPositive = (x) => +x === x && x > 0
In which conditions does it return a wrong value? I haven't found any.