Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / array / without.js
1 var baseDifference = require('../internal/baseDifference'),
2     isArrayLike = require('../internal/isArrayLike'),
3     restParam = require('../function/restParam');
4
5 /**
6  * Creates an array excluding all provided values using
7  * [`SameValueZero`](http://ecma-international.org/ecma-262/6.0/#sec-samevaluezero)
8  * for equality comparisons.
9  *
10  * @static
11  * @memberOf _
12  * @category Array
13  * @param {Array} array The array to filter.
14  * @param {...*} [values] The values to exclude.
15  * @returns {Array} Returns the new array of filtered values.
16  * @example
17  *
18  * _.without([1, 2, 1, 3], 1, 2);
19  * // => [3]
20  */
21 var without = restParam(function(array, values) {
22   return isArrayLike(array)
23     ? baseDifference(array, values)
24     : [];
25 });
26
27 module.exports = without;