* This method is like `_.findIndex` except that it iterates over elements * of `collection` from right to left. * * @static * @memberOf _ * @since 2.0.0 * @category Array * @param {Array} array The array to inspect. * @param {Function} [predicate=_.identity] T
(array, predicate, fromIndex)
| 7389 | * class="cm">// => 0 |
| 7390 | */ |
| 7391 | function findLastIndex(array, predicate, fromIndex) { |
| 7392 | var length = array == null ? 0 : array.length; |
| 7393 | if (!length) { |
| 7394 | return -1; |
| 7395 | } |
| 7396 | var index = length - 1; |
| 7397 | if (fromIndex !== undefined) { |
| 7398 | index = toInteger(fromIndex); |
| 7399 | index = fromIndex < 0 |
| 7400 | ? nativeMax(length + index, 0) |
| 7401 | : nativeMin(index, length - 1); |
| 7402 | } |
| 7403 | return baseFindIndex(array, getIteratee(predicate, 3), index, true); |
| 7404 | } |
| 7405 | |
| 7406 | /** |
| 7407 | * Flattens `array` a single level deep. |
nothing calls this directly
no test coverage detected