1 var arrayMap = require('./_arrayMap'),
2 baseIndexOf = require('./_baseIndexOf');
4 /** Used for built-in method references. */
5 var arrayProto = Array.prototype;
7 /** Built-in value references. */
8 var splice = arrayProto.splice;
11 * The base implementation of `_.pullAllBy` without support for iteratee
15 * @param {Array} array The array to modify.
16 * @param {Array} values The values to remove.
17 * @param {Function} [iteratee] The iteratee invoked per element.
18 * @returns {Array} Returns `array`.
20 function basePullAllBy(array, values, iteratee) {
22 length = values.length,
26 seen = arrayMap(array, function(value) { return iteratee(value); });
28 while (++index < length) {
30 value = values[index],
31 computed = iteratee ? iteratee(value) : value;
33 while ((fromIndex = baseIndexOf(seen, computed, fromIndex)) > -1) {
35 splice.call(seen, fromIndex, 1);
37 splice.call(array, fromIndex, 1);
43 module.exports = basePullAllBy;