mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 02:17:48 +00:00
Use more destructuring.
This commit is contained in:
@@ -9,7 +9,7 @@ import eq from '../eq.js'
|
||||
* @returns {number} Returns the index of the matched value, else `-1`.
|
||||
*/
|
||||
function assocIndexOf(array, key) {
|
||||
let length = array.length
|
||||
let { length } = array
|
||||
while (length--) {
|
||||
if (eq(array[length][0], key)) {
|
||||
return length
|
||||
|
||||
Reference in New Issue
Block a user