Use more destructuring.

This commit is contained in:
John-David Dalton
2017-03-12 23:16:34 -07:00
parent ad3236a859
commit c89637e4db
17 changed files with 17 additions and 17 deletions

View File

@@ -9,7 +9,7 @@
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
const length = array.length
const { length } = array
let index = fromIndex + (fromRight ? 1 : -1)
while ((fromRight ? index-- : ++index < length)) {