Closed Xotic750 closed 8 years ago
There are a couple of others that I will try to add, but you should have everything you need.
Changed those to String and 'NaN', hope that helps you a little more. On Node v0.10 and v0.12 the very first test on line 392 is failing to begin with.
expect(String(Number('0b12'))).to.equal('NaN');
https://github.com/paulmillr/es6-shim/pull/366/files#diff-cc37320af8aeb8b7582dad90cc114e55R392
Thanks, this is highlighting a real failure. Can you please rebase these two commits down to one? I'll merge it manually, along with the fix.
There are some other tests that highlight other issues but I guess we can take those separately?
I can leave this PR open, and you can keep adding commits to it, but if you rebase the existing diff into a single commit, I can cherry-pick it into master.
I can do that when I have a little time (next week), I think some of this affects your https://github.com/ljharb/es-abstract and https://github.com/ljharb/es-to-primitive projects.
It definitely does - please open issues/PRs there as well when you can :-)
Turns out to-primitive
doesn't have the bug, as it doesn't apply there. es-abstract
is now fixed. Thanks!
No problem, I think you still have the badHex issue though, some older environments, node v0.8 accepts +/-Hex value. But you may not be worried about such environments. I think the other (missing tests) are to check whitespace trimming, making sure that the correct ones are stripped.
@Xotic750 I am indeed worried about those environments - more tests are welcome.
These were recently fixed in lodash trunk, _.toNumber.
Original PR https://github.com/lodash/lodash/pull/1577 Actual merge https://github.com/lodash/lodash/commit/37955345ef3d515e9c2799b82fad545a0c22efce