1 contributor
Like
Install if-else as a package?
Copied
npm i @bit/justin-capalbo.ramda.if-else
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example modifieddraft
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
No preview available
chevron_left
chevron_right
ifElse (
condition:
Function
,onTrue:
Function
,onFalse:
) : Function
Function
Creates a function that will process either the onTrue
or the onFalse
function depending upon the result of the condition
predicate.
Example
Arguments
condition:
Function
A predicate function
onTrue:
Function
A function to invoke when the condition
evaluates to a truthy value.
onFalse:
Function
A function to invoke when the condition
evaluates to a falsy value.
Returns
Function
A new function that will process either the `onTrue` or the `onFalse` function depending upon the result of the `condition` predicate.