Travis build: 909
This commit is contained in:
@ -5,7 +5,7 @@ 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.
|
||||
|
||||
```js
|
||||
const compactWhitespace = str => str.replace(/\s{2,}/g,' ');
|
||||
const compactWhitespace = str => str.replace(/\s{2,}/g, ' ');
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
@ -11,7 +11,6 @@ const pipeAsyncFunctions = (...fns) => arg => fns.reduce((p, f) => p.then(f), Pr
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
const sum = pipeAsyncFunctions(
|
||||
x => x + 1,
|
||||
x => new Promise(resolve => setTimeout(() => resolve(x + 2), 1000)),
|
||||
|
||||
@ -6,7 +6,6 @@ Use `Array.prototype.filter()` to find array elements that return truthy values
|
||||
The `func` is invoked with three arguments (`value, index, array`).
|
||||
|
||||
```js
|
||||
|
||||
const remove = (arr, func) =>
|
||||
Array.isArray(arr)
|
||||
? arr.filter(func).reduce((acc, val) => {
|
||||
|
||||
Reference in New Issue
Block a user