From 86641d396dad1650ee7ab0edfc17b442deb63ac2 Mon Sep 17 00:00:00 2001
From: 30secondsofcode <30secondsofcode@gmail.com>
Date: Thu, 27 Sep 2018 19:49:30 +0000
Subject: [PATCH] Travis build: 541
---
README.md | 37 ++++++++++++++++++++++---------------
docs/index.html | 16 ++++++++--------
docs/math.html | 2 +-
docs/object.html | 2 +-
4 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/README.md b/README.md
index 345005740..bec32921f 100644
--- a/README.md
+++ b/README.md
@@ -1260,7 +1260,7 @@ const filterNonUnique = arr => arr.filter(i => arr.indexOf(i) === arr.lastIndexO
Examples
```js
-filterNonUnique([1, 2, 2, 3, 4, 4, 5]); // [1,3,5]
+filterNonUnique([1, 2, 2, 3, 4, 4, 5]); // [1, 3, 5]
```
@@ -1447,7 +1447,8 @@ head([1, 2, 3]); // 1
### indexOfAll
-Returns all indices of `val` in an array. If `val` never occurs, returns `[]`.
+Returns all indices of `val` in an array.
+If `val` never occurs, returns `[]`.
Use `Array.reduce()` to loop over elements and store indices for matching elements.
Return the array of indices.
@@ -1580,7 +1581,7 @@ const initializeArrayWithValues = (n, val = 0) => Array(n).fill(val);
Examples
```js
-initializeArrayWithValues(5, 2); // [2,2,2,2,2]
+initializeArrayWithValues(5, 2); // [2, 2, 2, 2, 2]
```
@@ -1630,7 +1631,7 @@ const intersection = (a, b) => {
Examples
```js
-intersection([1, 2, 3], [4, 3, 2]); // [2,3]
+intersection([1, 2, 3], [4, 3, 2]); // [2, 3]
```
@@ -1716,7 +1717,8 @@ isSorted([4, 3, 5]); // 0
### join
-Joins all elements of an array into a string and returns this string. Uses a separator and an end separator.
+Joins all elements of an array into a string and returns this string.
+Uses a separator and an end separator.
Use `Array.reduce()` to combine elements into a string.
Omit the second argument, `separator`, to use a default separator of `','`.
@@ -1858,7 +1860,8 @@ squareIt([1, 2, 3]); // { 1: 1, 2: 4, 3: 9 }
### maxN
-Returns the `n` maximum elements from the provided array. If `n` is greater than or equal to the provided array's length, then return the original array(sorted in descending order).
+Returns the `n` maximum elements from the provided array.
+If `n` is greater than or equal to the provided array's length, then return the original array (sorted in descending order).
Use `Array.sort()` combined with the spread operator (`...`) to create a shallow clone of the array and sort it in descending order.
Use `Array.slice()` to get the specified number of elements.
@@ -1882,7 +1885,8 @@ maxN([1, 2, 3], 2); // [3,2]
### minN
-Returns the `n` minimum elements from the provided array. If `n` is greater than or equal to the provided array's length, then return the original array(sorted in ascending order).
+Returns the `n` minimum elements from the provided array.
+If `n` is greater than or equal to the provided array's length, then return the original array (sorted in ascending order).
Use `Array.sort()` combined with the spread operator (`...`) to create a shallow clone of the array and sort it in ascending order.
Use `Array.slice()` to get the specified number of elements.
@@ -2412,7 +2416,7 @@ const shuffle = ([...arr]) => {
```js
const foo = [1, 2, 3];
-shuffle(foo); // [2,3,1], foo = [1,2,3]
+shuffle(foo); // [2, 3, 1], foo = [1, 2, 3]
```
@@ -2433,7 +2437,7 @@ const similarity = (arr, values) => arr.filter(v => values.includes(v));
Examples
```js
-similarity([1, 2, 3], [1, 2, 4]); // [1,2]
+similarity([1, 2, 3], [1, 2, 4]); // [1, 2]
```
@@ -2897,7 +2901,7 @@ const uniqueElements = arr => [...new Set(arr)];
Examples
```js
-uniqueElements([1, 2, 2, 3, 4, 4, 5]); // [1,2,3,4,5]
+uniqueElements([1, 2, 2, 3, 4, 4, 5]); // [1, 2, 3, 4, 5]
```
@@ -3248,7 +3252,8 @@ bottomVisible(); // true
⚠️ **NOTICE:** The same functionality can be easily implemented by using the new asynchronous Clipboard API, which is still experimental but should be used in the future instead of this snippet. Find out more about it [here](https://github.com/w3c/clipboard-apis/blob/master/explainer.adoc#writing-to-the-clipboard).
-Copy a string to the clipboard. Only works as a result of user action (i.e. inside a `click` event listener).
+Copy a string to the clipboard.
+Only works as a result of user action (i.e. inside a `click` event listener).
Create a new `