* The base implementation of `_.pullAllBy` without support for iteratee * shorthands. * * @private * @param {Array} array The array to modify. * @param {Array} values The values to remove. * @param {Function} [iteratee] The iteratee invoked per element. * @param {F
(array, values, iteratee, comparator)
| 3859 | * @returns {Array} Returns `array`. |
| 3860 | */ |
| 3861 | function basePullAll(array, values, iteratee, comparator) { |
| 3862 | var indexOf = comparator ? baseIndexOfWith : baseIndexOf, |
| 3863 | index = -1, |
| 3864 | length = values.length, |
| 3865 | seen = array; |
| 3866 | |
| 3867 | if (array === values) { |
| 3868 | values = copyArray(values); |
| 3869 | } |
| 3870 | if (iteratee) { |
| 3871 | seen = arrayMap(array, baseUnary(iteratee)); |
| 3872 | } |
| 3873 | while (++index < length) { |
| 3874 | var fromIndex = 0, |
| 3875 | value = values[index], |
| 3876 | computed = iteratee ? iteratee(value) : value; |
| 3877 | |
| 3878 | while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { |
| 3879 | if (seen !== array) { |
| 3880 | splice.call(seen, fromIndex, 1); |
| 3881 | } |
| 3882 | splice.call(array, fromIndex, 1); |
| 3883 | } |
| 3884 | } |
| 3885 | return array; |
| 3886 | } |
| 3887 | |
| 3888 | /** |
| 3889 | * The base implementation of `_.pullAt` without support for individual |