Simplify _.every and _.some.

This commit is contained in:
John-David Dalton
2014-02-06 09:06:35 -08:00
parent 23b495aee8
commit 8a2e06a713
7 changed files with 33 additions and 33 deletions

8
dist/lodash.js vendored
View File

@@ -3232,8 +3232,8 @@
if (typeof length == 'number') {
while (++index < length) {
if (!(result = !!callback(collection[index], index, collection))) {
break;
if (!callback(collection[index], index, collection)) {
return false;
}
}
} else {
@@ -4106,8 +4106,8 @@
if (typeof length == 'number') {
while (++index < length) {
if ((result = callback(collection[index], index, collection))) {
break;
if (callback(collection[index], index, collection)) {
return true;
}
}
} else {