1 var baseIteratee = require('./_baseIteratee'),
2 basePullAllBy = require('./_basePullAllBy');
5 * This method is like `_.pullAll` except that it accepts `iteratee` which is
6 * invoked for each element of `array` and `values` to generate the criterion
7 * by which uniqueness is computed. The iteratee is invoked with one argument: (value).
9 * **Note:** Unlike `_.differenceBy`, this method mutates `array`.
14 * @param {Array} array The array to modify.
15 * @param {Array} values The values to remove.
16 * @param {Function|Object|string} [iteratee=_.identity] The iteratee invoked per element.
17 * @returns {Array} Returns `array`.
20 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
22 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
26 function pullAllBy(array, values, iteratee) {
27 return (array && array.length && values && values.length)
28 ? basePullAllBy(array, values, baseIteratee(iteratee))
32 module.exports = pullAllBy;