summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/lodash/pullAll.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/lodash/pullAll.js')
-rw-r--r--tools/eslint/node_modules/lodash/pullAll.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/lodash/pullAll.js b/tools/eslint/node_modules/lodash/pullAll.js
new file mode 100644
index 0000000000..4eecae6138
--- /dev/null
+++ b/tools/eslint/node_modules/lodash/pullAll.js
@@ -0,0 +1,28 @@
+var basePullAll = require('./_basePullAll');
+
+/**
+ * This method is like `_.pull` except that it accepts an array of values to remove.
+ *
+ * **Note:** Unlike `_.difference`, this method mutates `array`.
+ *
+ * @static
+ * @memberOf _
+ * @category Array
+ * @param {Array} array The array to modify.
+ * @param {Array} values The values to remove.
+ * @returns {Array} Returns `array`.
+ * @example
+ *
+ * var array = [1, 2, 3, 1, 2, 3];
+ *
+ * _.pullAll(array, [2, 3]);
+ * console.log(array);
+ * // => [1, 1]
+ */
+function pullAll(array, values) {
+ return (array && array.length && values && values.length)
+ ? basePullAll(array, values)
+ : array;
+}
+
+module.exports = pullAll;