Sign in
chromium
/
devtools
/
devtools-frontend
/
refs/heads/main
/
.
/
node_modules
/
rambda
/
src
/
findIndex.js
blob: d9411adf4647674ff3debfef2be51afa61de9609 [
file
] [
log
] [
blame
] [
edit
]
export
function
findIndex
(
predicate
,
list
){
if
(
arguments
.
length
===
1
)
return
_list
=>
findIndex
(
predicate
,
_list
)
const
len
=
list
.
length
let index
=
-
1
while
(++
index
<
len
){
if
(
predicate
(
list
[
index
])){
return
index
}
}
return
-
1
}