every.js 193 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
'use strict';

module.exports = function every(array, predicate) {
	for (var i = 0; i < array.length; i += 1) {
		if (!predicate(array[i], i, array)) {
			return false;
		}
	}
	return true;
};