2016-07-24 09:52:04 -07:00
|
|
|
define(['./_baseRest', './pullAll'], function(baseRest, pullAll) {
|
2015-12-16 17:53:20 -08:00
|
|
|
|
|
|
|
|
/**
|
2016-02-07 23:04:40 -08:00
|
|
|
* Removes all given values from `array` using
|
2016-08-07 21:21:03 -07:00
|
|
|
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
2015-12-16 17:53:20 -08:00
|
|
|
* for equality comparisons.
|
|
|
|
|
*
|
2016-02-21 20:40:07 -08:00
|
|
|
* **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
|
|
|
|
|
* to remove elements from an array by predicate.
|
2015-12-16 17:53:20 -08:00
|
|
|
*
|
|
|
|
|
* @static
|
|
|
|
|
* @memberOf _
|
2016-03-26 00:00:01 -07:00
|
|
|
* @since 2.0.0
|
2015-12-16 17:53:20 -08:00
|
|
|
* @category Array
|
|
|
|
|
* @param {Array} array The array to modify.
|
|
|
|
|
* @param {...*} [values] The values to remove.
|
|
|
|
|
* @returns {Array} Returns `array`.
|
|
|
|
|
* @example
|
|
|
|
|
*
|
2016-05-21 00:48:34 -07:00
|
|
|
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
|
2015-12-16 17:53:20 -08:00
|
|
|
*
|
2016-05-21 00:48:34 -07:00
|
|
|
* _.pull(array, 'a', 'c');
|
2015-12-16 17:53:20 -08:00
|
|
|
* console.log(array);
|
2016-05-21 00:48:34 -07:00
|
|
|
* // => ['b', 'b']
|
2015-12-16 17:53:20 -08:00
|
|
|
*/
|
2016-07-24 09:52:04 -07:00
|
|
|
var pull = baseRest(pullAll);
|
2015-12-16 17:53:20 -08:00
|
|
|
|
|
|
|
|
return pull;
|
|
|
|
|
});
|