Check if a predicate
function returns true for all values in a collection
.
$ component install ndhoule/every
$ npm install @ndhoule/every
var isEven = function(num) { return num % 2 === 0; };
every(isEven, []); // => false
every(isEven, [1, 2]); // => false
every(isEven, [2, 4, 6]); // => true
Released under the MIT license.