Please sign in to comment.
Updated _.isFinite to match ES5 and ES6 spec
The EcmaScript 5 and 6 spec define isFinite as returning false only if ToNumber(number) is NaN, Infinity, or −Infinity. Current implementation of _.isFinite acts as if ToNumber('42') is NaN. This commit fixes it while also catching the special gotcha in the spec where isFinite(' ') returns true. It's also much faster than current implementation.
- Loading branch information...