diff options
Diffstat (limited to 'tools/eslint/node_modules/lodash/without.js')
-rw-r--r-- | tools/eslint/node_modules/lodash/without.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/lodash/without.js b/tools/eslint/node_modules/lodash/without.js new file mode 100644 index 0000000000..b7dea5d5cc --- /dev/null +++ b/tools/eslint/node_modules/lodash/without.js @@ -0,0 +1,27 @@ +var baseDifference = require('./_baseDifference'), + isArrayLikeObject = require('./isArrayLikeObject'), + rest = require('./rest'); + +/** + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero) + * for equality comparisons. + * + * @static + * @memberOf _ + * @category Array + * @param {Array} array The array to filter. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.without([1, 2, 1, 3], 1, 2); + * // => [3] + */ +var without = rest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; +}); + +module.exports = without; |