mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Use Array.isArray.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import arrayFilter from './_arrayFilter.js';
|
||||
import baseFilter from './_baseFilter.js';
|
||||
import isArray from './isArray.js';
|
||||
import negate from './negate.js';
|
||||
|
||||
/**
|
||||
@@ -25,7 +24,7 @@ import negate from './negate.js';
|
||||
* // => objects for ['fred']
|
||||
*/
|
||||
function reject(collection, predicate) {
|
||||
const func = isArray(collection) ? arrayFilter : baseFilter;
|
||||
const func = Array.isArray(collection) ? arrayFilter : baseFilter;
|
||||
return func(collection, negate(predicate));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user