all

v0.9.6arrow_drop_down
v0.9.6
STATUS
Passing
DOWNLOADS
3
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
1 KB
Returns `true` if all elements of the list match the predicate, `false` if there are any that don't.
1 contributor
Install all as a package?
Copied
npm i @bit/justin-capalbo.ramda.all
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
all (
fn:Function,
list:Array
) : Boolean

Returns true if all elements of the list match the predicate, false if there are any that don’t.

Dispatches to the all method of the second argument, if present.

Acts as a transducer if a transformer is given in list position.

Example
const equals3 = R.equals(3);
     R.all(equals3)([3, 3, 3, 3]); //=> true
     R.all(equals3)([3, 3, 1, 3]); //=> false
Arguments
fn: Function

The predicate function.

list: Array

The array to consider.

Returns
Boolean

`true` if the predicate is satisfied by every element, `false` otherwise.

Help and resources