| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | var baseRest = require('./_baseRest'), |
| 2 | pullAll = require('./pullAll'); |
| 3 | |
| 4 | /** |
| 5 | * Removes all given values from `array` using |
| 6 | * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) |
| 7 | * for equality comparisons. |
| 8 | * |
| 9 | * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` |
| 10 | * to remove elements from an array by predicate. |
| 11 | * |
| 12 | * @static |
| 13 | * @memberOf _ |
| 14 | * @since 2.0.0 |
| 15 | * @category Array |
| 16 | * @param {Array} array The array to modify. |
| 17 | * @param {...*} [values] The values to remove. |
| 18 | * @returns {Array} Returns `array`. |
| 19 | * @example |
| 20 | * |
| 21 | * var array = ['a', 'b', 'c', 'a', 'b', 'c']; |
| 22 | * |
| 23 | * _.pull(array, 'a', 'c'); |
| 24 | * console.log(array); |
| 25 | * // => ['b', 'b'] |
| 26 | */ |
| 27 | var pull = baseRest(pullAll); |
| 28 | |
| 29 | module.exports = pull; |