Share your code. Components are building blocks, you are the architect.

utils/all-pass
v1.0.0
1.0.0
MIT
PUBLIC
0
0     DEPENDENCIES
Build: none
BuildNone
Takes a list of predicates and returns a predicate that returns true for a

Please configure Bit as a scoped registry to install components with NPM.Learn more

npm config set '@bit:registry' https://node.bitsrc.io
Use utils/all-pass in your project
npm i @bit/bit.ramda.utils.all-pass
Copied

allPass (predicates:Array) : Function

Takes a list of predicates and returns a predicate that returns true for a given list of arguments if every one of the provided predicates is satisfied by those arguments.

The function returned is a curried function whose arity matches that of the highest-arity predicate.

Example

var isQueen = R.propEq('rank', 'Q');
     var isSpade = R.propEq('suit', '♠︎');
     var isQueenOfSpades = R.allPass([isQueen, isSpade]);

     isQueenOfSpades({rank: 'Q', suit: '♣︎'}); //=> false
     isQueenOfSpades({rank: 'Q', suit: '♠︎'}); //=> true

Argument

predicates: Array

An array of predicates to check

Returns

Function

The combined predicate