Sign in
chromium
/
devtools
/
devtools-frontend
/
refs/heads/main
/
.
/
node_modules
/
rambda
/
src
/
cond.js
blob: 16d51151581d3e9aea5008994f8b42553e60964a [
file
] [
log
] [
blame
] [
edit
]
export
function
cond
(
conditions
){
return
input
=>
{
let done
=
false
let toReturn
conditions
.
forEach
(([
predicate
,
resultClosure
])
=>
{
if
(!
done
&&
predicate
(
input
)){
done
=
true
toReturn
=
resultClosure
(
input
)
}
})
return
toReturn
}
}