Docment is.any with multiple predicates in readme

This commit is contained in:
Dave Cohen 2020-02-15 18:04:50 -06:00
parent 54579a0167
commit 9b89df2393

View file

@ -432,6 +432,20 @@ is.any(is.boolean, 'unicorns', [], new Map());
//=> false
```
See below for use with multiple predicates.
##### .any(predicates[], ...values)
Returns `true` if **any** of the input `values` returns true in **any** of the `predicates` provided in an array:
```js
is.any([is.string, is.number], {}, true, '🦄');
//=> true
is.any([is.boolean, is.number], 'unicorns', [], new Map());
//=> false
```
##### .all(predicate, ...values)
Returns `true` if **all** of the input `values` returns true in the `predicate`: