Version 1
[yaffs-website] / node_modules / grunt-legacy-log / node_modules / lodash / array / without.js
diff --git a/node_modules/grunt-legacy-log/node_modules/lodash/array/without.js b/node_modules/grunt-legacy-log/node_modules/lodash/array/without.js
new file mode 100644 (file)
index 0000000..2ac3d11
--- /dev/null
@@ -0,0 +1,27 @@
+var baseDifference = require('../internal/baseDifference'),
+    isArrayLike = require('../internal/isArrayLike'),
+    restParam = require('../function/restParam');
+
+/**
+ * Creates an array excluding all provided 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 = restParam(function(array, values) {
+  return isArrayLike(array)
+    ? baseDifference(array, values)
+    : [];
+});
+
+module.exports = without;