complement

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
2
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
3 KB
Takes a function `f` and returns a function `g` such that if called with the same arguments
1 contributor
Install complement as a package?
Copied
npm i @bit/justin-capalbo.ramda.complement
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
No preview available
modifieddraft
chevron_left
chevron_right
complement (
f:Function
) : Function

Takes a function f and returns a function g such that if called with the same arguments when f returns a “truthy” value, g returns false and when f returns a “falsy” value g returns true.

R.complement may be applied to any functor

Example
const isNotNil = R.complement(R.isNil);
     isNil(null); //=> true
     isNotNil(null); //=> false
     isNil(7); //=> false
     isNotNil(7); //=> true
Argument
f: Function
Returns
Function

Help and resources