basant307/AI_Governance_Project
045
1import baseIteratee from './_baseIteratee.js';2import basePullAll from './_basePullAll.js';3 4/**5 * This method is like `_.pullAll` except that it accepts `iteratee` which is6 * invoked for each element of `array` and `values` to generate the criterion7 * by which they're compared. The iteratee is invoked with one argument: (value).8 *9 * **Note:** Unlike `_.differenceBy`, this method mutates `array`.10 *11 * @static12 * @memberOf _13 * @since 4.0.014 * @category Array15 * @param {Array} array The array to modify.16 * @param {Array} values The values to remove.17 * @param {Function} [iteratee=_.identity] The iteratee invoked per element.18 * @returns {Array} Returns `array`.19 * @example20 *21 * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];22 *23 * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');24 * console.log(array);25 * // => [{ 'x': 2 }]26 */27function pullAllBy(array, values, iteratee) {28 return (array && array.length && values && values.length)29 ? basePullAll(array, values, baseIteratee(iteratee, 2))30 : array;31}32 33export default pullAllBy;34 