Sign in
chromium
/
devtools
/
devtools-frontend.git
/
HEAD
/
.
/
node_modules
/
rambda
/
src
/
when.js
blob: fd4cfd0bb2c83e30f66f6e220d971fffdc4f0ac6 [
file
] [
log
] [
blame
]
import
{
curry
}
from
'./curry.js'
function
whenFn
(
predicate
,
whenTrueFn
,
input
){
if
(!
predicate
(
input
))
return
input
return
whenTrueFn
(
input
)
}
export
const
when
=
curry
(
whenFn
)