-
Notifications
You must be signed in to change notification settings - Fork 115
_.isInteger([1]) returns true #252
Open
Labels
Description
There is an issue with the function predictates isInteger() and isFloat() where a number is passed in an array of length 1.
eg:
_.isInteger([1])
// true
_.isFloat([1.1])
// true
// both should be false.
The fix for this should be pretty easy by just adding if (i === undefined || i === null || i instanceof Array) return false to the top of isNumeric.
This simple gate will block undefined, null and array.
Suggestions?
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.