Travis build: 194
This commit is contained in:
24
README.md
24
README.md
@ -107,6 +107,7 @@ average(1, 2, 3);
|
|||||||
<summary>View contents</summary>
|
<summary>View contents</summary>
|
||||||
|
|
||||||
* [`all`](#all)
|
* [`all`](#all)
|
||||||
|
* [`allEqual`](#allequal)
|
||||||
* [`any`](#any)
|
* [`any`](#any)
|
||||||
* [`arrayToCSV`](#arraytocsv)
|
* [`arrayToCSV`](#arraytocsv)
|
||||||
* [`bifurcate`](#bifurcate)
|
* [`bifurcate`](#bifurcate)
|
||||||
@ -835,6 +836,29 @@ all([1, 2, 3]); // true
|
|||||||
<br>[⬆ Back to top](#table-of-contents)
|
<br>[⬆ Back to top](#table-of-contents)
|
||||||
|
|
||||||
|
|
||||||
|
### allEqual
|
||||||
|
|
||||||
|
Check if all elements are equal
|
||||||
|
|
||||||
|
Use `Array.every()` to check if all the elements of the array are the same as the first one.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const allEqual = arr => arr.every(val => val === arr[0]);
|
||||||
|
```
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Examples</summary>
|
||||||
|
|
||||||
|
```js
|
||||||
|
allEqual([1, 2, 3, 4, 5, 6]); // false
|
||||||
|
allEqual([1, 1, 1, 1]); // true
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<br>[⬆ Back to top](#table-of-contents)
|
||||||
|
|
||||||
|
|
||||||
### any
|
### any
|
||||||
|
|
||||||
Returns `true` if the provided predicate function returns `true` for at least one element in a collection, `false` otherwise.
|
Returns `true` if the provided predicate function returns `true` for at least one element in a collection, `false` otherwise.
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user