summaryrefslogtreecommitdiff
path: root/school/node_modules/@arr/every/module.js
blob: 18a420862c93887a336849c818a9de045b0bfdb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
export default function (arr, cb) {
	var i=0, len=arr.length;

	for (; i < len; i++) {
		if (!cb(arr[i], i, arr)) {
			return false;
		}
	}

	return true;
}