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