Sign in
chromium
/
devtools
/
devtools-frontend
/
refs/heads/main
/
.
/
node_modules
/
rambda
/
src
/
findLastIndex.js
blob: c25ba1b26752c4822dd004276781f0532d36a27c [
file
] [
log
] [
blame
] [
edit
]
export
function
findLastIndex
(
fn
,
list
){
if
(
arguments
.
length
===
1
)
return
_list
=>
findLastIndex
(
fn
,
_list
)
let index
=
list
.
length
while
(--
index
>=
0
){
if
(
fn
(
list
[
index
])){
return
index
}
}
return
-
1
}