Put new .any examples under the same header as existing
This commit is contained in:
parent
9a277dae3c
commit
b662c7cddc
1 changed files with 3 additions and 7 deletions
10
readme.md
10
readme.md
|
|
@ -420,9 +420,9 @@ Returns `true` if `value` is an even integer.
|
||||||
|
|
||||||
Returns `true` if `value` is an odd integer.
|
Returns `true` if `value` is an odd integer.
|
||||||
|
|
||||||
##### .any(predicate, ...values)
|
##### .any(predicate | predicates[], ...values)
|
||||||
|
|
||||||
Returns `true` if **any** of the input `values` returns true in the `predicate`:
|
Using a single `predicate` argument, returns `true` if **any** of the input `values` returns true in the `predicate`:
|
||||||
|
|
||||||
```js
|
```js
|
||||||
is.any(is.string, {}, true, '🦄');
|
is.any(is.string, {}, true, '🦄');
|
||||||
|
|
@ -432,11 +432,7 @@ is.any(is.boolean, 'unicorns', [], new Map());
|
||||||
//=> false
|
//=> false
|
||||||
```
|
```
|
||||||
|
|
||||||
See below for use with multiple predicates.
|
Using an array of `predicates`, returns `true` if **any** of the input `values` returns true for **any** of the `predicates` provided in an array:
|
||||||
|
|
||||||
##### .any(predicates[], ...values)
|
|
||||||
|
|
||||||
Returns `true` if **any** of the input `values` returns true in **any** of the `predicates` provided in an array:
|
|
||||||
|
|
||||||
```js
|
```js
|
||||||
is.any([is.string, is.number], {}, true, '🦄');
|
is.any([is.string, is.number], {}, true, '🦄');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue