Version 1
[yaffs-website] / node_modules / uncss / node_modules / lodash / internal / baseEvery.js
diff --git a/node_modules/uncss/node_modules/lodash/internal/baseEvery.js b/node_modules/uncss/node_modules/lodash/internal/baseEvery.js
new file mode 100644 (file)
index 0000000..e85eceb
--- /dev/null
@@ -0,0 +1,20 @@
+var baseEach = require('./baseEach');
+
+/**
+ * The base implementation of `_.every` without support for iteratee shorthands.
+ *
+ * @private
+ * @param {Array|Object} collection The collection to iterate over.
+ * @param {Function} predicate The function invoked per iteration.
+ * @returns {boolean} Returns `true` if all elements pass the predicate check, else `false`
+ */
+function baseEvery(collection, predicate) {
+  var result = true;
+  baseEach(collection, function(value, index, collection) {
+    result = !!predicate(value, index, collection);
+    return result;
+  });
+  return result;
+}
+
+module.exports = baseEvery;