Sign in
chromium
/
external
/
github.com
/
SeleniumHQ
/
selenium
/
refs/heads/api-docs-4.30.0-all
/
.
/
node_modules
/
rambda
/
src
/
when.js
blob: fd4cfd0bb2c83e30f66f6e220d971fffdc4f0ac6 [
file
] [
log
] [
blame
] [
edit
]
import
{
curry
}
from
'./curry.js'
function
whenFn
(
predicate
,
whenTrueFn
,
input
){
if
(!
predicate
(
input
))
return
input
return
whenTrueFn
(
input
)
}
export
const
when
=
curry
(
whenFn
)