mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Use const and let for var declaration in baseEach and baseEachRight.
This commit is contained in:
@@ -16,9 +16,9 @@ function baseEach(collection, iteratee) {
|
|||||||
if (!isArrayLike(collection)) {
|
if (!isArrayLike(collection)) {
|
||||||
return baseForOwn(collection, iteratee)
|
return baseForOwn(collection, iteratee)
|
||||||
}
|
}
|
||||||
var length = collection.length,
|
const length = collection.length
|
||||||
index = -1,
|
const iterable = Object(collection)
|
||||||
iterable = Object(collection)
|
let index = -1
|
||||||
|
|
||||||
while (++index < length) {
|
while (++index < length) {
|
||||||
if (iteratee(iterable[index], index, iterable) === false) {
|
if (iteratee(iterable[index], index, iterable) === false) {
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ function baseEachRight(collection, iteratee) {
|
|||||||
if (!isArrayLike(collection)) {
|
if (!isArrayLike(collection)) {
|
||||||
return baseForOwnRight(collection, iteratee)
|
return baseForOwnRight(collection, iteratee)
|
||||||
}
|
}
|
||||||
var length = collection.length,
|
const iterable = Object(collection)
|
||||||
iterable = Object(collection)
|
let length = collection.length
|
||||||
|
|
||||||
while (length--) {
|
while (length--) {
|
||||||
if (iteratee(iterable[length], length, iterable) === false) {
|
if (iteratee(iterable[length], length, iterable) === false) {
|
||||||
|
|||||||
Reference in New Issue
Block a user