1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- var baseDifference = require('./_baseDifference'),
- baseFlatten = require('./_baseFlatten'),
- baseIteratee = require('./_baseIteratee'),
- baseRest = require('./_baseRest'),
- isArrayLikeObject = require('./isArrayLikeObject'),
- last = require('./last');
- var differenceBy = baseRest(function(array, values) {
- var iteratee = last(values);
- if (isArrayLikeObject(iteratee)) {
- iteratee = undefined;
- }
- return isArrayLikeObject(array)
- ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), baseIteratee(iteratee, 2))
- : [];
- });
- module.exports = differenceBy;
|