Docment is.any with multiple predicates in readme
This commit is contained in:
parent
54579a0167
commit
9b89df2393
1 changed files with 14 additions and 0 deletions
14
readme.md
14
readme.md
|
|
@ -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`:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue