mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
avoiding isFunction in _.include
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
|
||||
// Determine if a given value is included in the array or object using '==='.
|
||||
_.include = function(obj, target) {
|
||||
if (obj && _.isFunction(obj.indexOf)) return _.indexOf(obj, target) != -1;
|
||||
if (obj && obj.indexOf === nativeIndexOf) return obj.indexOf(target) != -1;
|
||||
return !! _.detect(obj, function(value) {
|
||||
return value === target;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user