Sha256: 6c67efa1da58a9da803b77ea276ec10e1ba9cbdb74794b0905aae7e431d0fec2

Contents?: true

Size: 1 KB

Versions: 300

Compression:

Stored size: 1 KB

Contents

var basePullAll = require('./_basePullAll');

/**
 * This method is like `_.pullAll` except that it accepts `comparator` which
 * is invoked to compare elements of `array` to `values`. The comparator is
 * invoked with two arguments: (arrVal, othVal).
 *
 * **Note:** Unlike `_.differenceWith`, this method mutates `array`.
 *
 * @static
 * @memberOf _
 * @since 4.6.0
 * @category Array
 * @param {Array} array The array to modify.
 * @param {Array} values The values to remove.
 * @param {Function} [comparator] The comparator invoked per element.
 * @returns {Array} Returns `array`.
 * @example
 *
 * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
 *
 * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
 * console.log(array);
 * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
 */
function pullAllWith(array, values, comparator) {
  return (array && array.length && values && values.length)
    ? basePullAll(array, values, undefined, comparator)
    : array;
}

module.exports = pullAllWith;

Version data entries

300 entries across 276 versions & 32 rubygems

Version Path
clapton-0.0.19 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.49 node_modules/lodash/pullAllWith.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.48 node_modules/lodash/pullAllWith.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.6 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.5 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.4 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.3 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.2 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js