Travis build: 1104

This commit is contained in:
30secondsofcode
2019-04-08 18:22:10 +00:00
parent 27b8ca7521
commit 40371f9a6e
6 changed files with 10 additions and 7 deletions

View File

@@ -2942,7 +2942,7 @@ uniqueElements([1, 2, 2, 3, 4, 4, 5]); // [1, 2, 3, 4, 5]
Returns all unique values of an array, based on a provided comparator function.
Use `Array.prototype.reduce()` and `Array.prototype.some()` for an array containing only the first unique occurence of each value, based on the comparator function, `fn`.
Use `Array.prototype.reduce()` and `Array.prototype.some()` for an array containing only the first unique occurrence of each value, based on the comparator function, `fn`.
The comparator function takes two arguments: the values of the two elements being compared.
```js
@@ -2977,7 +2977,7 @@ uniqueElementsBy(
Returns all unique values of an array, based on a provided comparator function.
Use `Array.prototype.reduce()` and `Array.prototype.some()` for an array containing only the last unique occurence of each value, based on the comparator function, `fn`.
Use `Array.prototype.reduce()` and `Array.prototype.some()` for an array containing only the last unique occurrence of each value, based on the comparator function, `fn`.
The comparator function takes two arguments: the values of the two elements being compared.
```js
@@ -4729,6 +4729,7 @@ const checkProp = (predicate, prop) => obj => !!predicate(obj[prop]);
const lengthIs4 = checkProp(l => l === 4, 'length');
lengthIs4([]); // false
lengthIs4([1,2,3,4]); // true
@@ -7909,7 +7910,7 @@ capitalizeEveryWord('hello world!'); // 'Hello World!'
Returns a string with whitespaces compacted.
Use `String.prototype.replace()` with a regular expression to replace all occurences of 2 or more whitespace characters with a single space.
Use `String.prototype.replace()` with a regular expression to replace all occurrences of 2 or more whitespace characters with a single space.
```js
const compactWhitespace = str => str.replace(/\s{2,}/g, ' ');