mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Simplify _.every and _.some.
This commit is contained in:
@@ -3514,8 +3514,8 @@
|
||||
length = collection.length;
|
||||
|
||||
while (++index < length) {
|
||||
if (!(result = !!callback(collection[index], index, collection))) {
|
||||
break;
|
||||
if (!callback(collection[index], index, collection)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -4386,8 +4386,8 @@
|
||||
length = collection.length;
|
||||
|
||||
while (++index < length) {
|
||||
if ((result = callback(collection[index], index, collection))) {
|
||||
break;
|
||||
if (callback(collection[index], index, collection)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user