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
immosquare-cleaner-0.1.60 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.59 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.58 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.57 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.56 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.55 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.54 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.53 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.52 node_modules/lodash/pullAllWith.js
trusty-cms-6.3.1 node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.51 node_modules/lodash/pullAllWith.js
boring_generators-0.15.0 tmp/templates/app_template/node_modules/lodash/pullAllWith.js
clapton-0.0.26 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.25 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
immosquare-cleaner-0.1.50 node_modules/lodash/pullAllWith.js
clapton-0.0.24 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.23 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.22 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.21 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js
clapton-0.0.20 lib/clapton/javascripts/node_modules/lodash/pullAllWith.js