cf40201700f7452da5e103c1c3191569ed43ad4a
[yaffs-website] / node_modules / uncss / node_modules / lodash / pullAll.js
1 var basePullAll = require('./internal/basePullAll');
2
3 /**
4  * This method is like `_.pull` except that it accepts an array of values to remove.
5  *
6  * **Note:** Unlike `_.difference`, this method mutates `array`.
7  *
8  * @static
9  * @memberOf _
10  * @category Array
11  * @param {Array} array The array to modify.
12  * @param {Array} values The values to remove.
13  * @returns {Array} Returns `array`.
14  * @example
15  *
16  * var array = [1, 2, 3, 1, 2, 3];
17  *
18  * _.pullAll(array, [2, 3]);
19  * console.log(array);
20  * // => [1, 1]
21  */
22 function pullAll(array, values) {
23   return (array && array.length && values && values.length)
24     ? basePullAll(array, values)
25     : array;
26 }
27
28 module.exports = pullAll;