Remove semicolons.

This commit is contained in:
John-David Dalton
2017-02-04 23:50:10 -08:00
parent f3a8e55e70
commit 6cb3460fce
452 changed files with 4261 additions and 4261 deletions

View File

@@ -1,9 +1,9 @@
import baseFindIndex from './.internal/baseFindIndex.js';
import toInteger from './toInteger.js';
import baseFindIndex from './.internal/baseFindIndex.js'
import toInteger from './toInteger.js'
/* Built-in method references for those with the same name as other `lodash` methods. */
const nativeMax = Math.max;
const nativeMin = Math.min;
const nativeMax = Math.max
const nativeMin = Math.min
/**
* This method is like `findIndex` except that it iterates over elements
@@ -22,24 +22,24 @@ const nativeMin = Math.min;
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
* ]
*
* findLastIndex(users, ({ user }) => user == 'pebbles');
* findLastIndex(users, ({ user }) => user == 'pebbles')
* // => 2
*/
function findLastIndex(array, predicate, fromIndex) {
const length = array == null ? 0 : array.length;
const length = array == null ? 0 : array.length
if (!length) {
return -1;
return -1
}
let index = length - 1;
let index = length - 1
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = toInteger(fromIndex)
index = fromIndex < 0
? nativeMax(length + index, 0)
: nativeMin(index, length - 1);
: nativeMin(index, length - 1)
}
return baseFindIndex(array, predicate, index, true);
return baseFindIndex(array, predicate, index, true)
}
export default findLastIndex;
export default findLastIndex