You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.
That would check if the input was precisely that number (including the type), but the comment states that it checks whether the value coerces to a number, so perhaps it should also really be double equals, rather than triple? Or perhaps the comment should be corrected?
The text was updated successfully, but these errors were encountered:
As, obviously, this code could never return false. You could replace the entire implementation with return true and it would behave the same way.
Not quite:
> NaN === NaN
false
Which I think is the intent, in which case it would perhaps be clearer for this function to be implemented as return !isNaN(obj - 0); or perhaps return !isNaN(+obj);.
I was just reviewing this code, and noticed that the following doesn't seem to make sense:
humps/humps.js
Lines 94 to 98 in d612998
As, obviously, this code could never return false. You could replace the entire implementation with
return true
and it would behave the same way.Perhaps this would be more in-line with the original intent?
That would check if the input was precisely that number (including the type), but the comment states that it checks whether the value coerces to a number, so perhaps it should also really be double equals, rather than triple? Or perhaps the comment should be corrected?
The text was updated successfully, but these errors were encountered: