mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 10:17:48 +00:00
Simplify _.every and _.some.
This commit is contained in:
8
dist/lodash.underscore.js
vendored
8
dist/lodash.underscore.js
vendored
@@ -2159,8 +2159,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 {
|
||||
@@ -2989,8 +2989,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 {
|
||||
|
||||
Reference in New Issue
Block a user