Travis build: 909
This commit is contained in:
25
README.md
25
README.md
@ -406,6 +406,7 @@ _30s.average(1, 2, 3);
|
||||
* [`byteSize`](#bytesize)
|
||||
* [`capitalize`](#capitalize)
|
||||
* [`capitalizeEveryWord`](#capitalizeeveryword)
|
||||
* [`compactWhitespace`](#compactwhitespace)
|
||||
* [`CSVToArray`](#csvtoarray)
|
||||
* [`CSVToJSON`](#csvtojson-)
|
||||
* [`decapitalize`](#decapitalize)
|
||||
@ -664,7 +665,6 @@ const pipeAsyncFunctions = (...fns) => arg => fns.reduce((p, f) => p.then(f), Pr
|
||||
<summary>Examples</summary>
|
||||
|
||||
```js
|
||||
|
||||
const sum = pipeAsyncFunctions(
|
||||
x => x + 1,
|
||||
x => new Promise(resolve => setTimeout(() => resolve(x + 2), 1000)),
|
||||
@ -2313,7 +2313,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) => {
|
||||
@ -7728,6 +7727,28 @@ capitalizeEveryWord('hello world!'); // 'Hello World!'
|
||||
|
||||
<br>[⬆ Back to top](#contents)
|
||||
|
||||
### compactWhitespace
|
||||
|
||||
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, ' ');
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Examples</summary>
|
||||
|
||||
```js
|
||||
compactWhitespace('Lorem Ipsum'); // 'Lorem Ipsum'
|
||||
compactWhitespace('Lorem \n Ipsum'); // 'Lorem Ipsum'
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<br>[⬆ Back to top](#contents)
|
||||
|
||||
### CSVToArray
|
||||
|
||||
Converts a comma-separated values (CSV) string to a 2D array.
|
||||
|
||||
@ -415,6 +415,7 @@
|
||||
</h4><ul><li><a tags="string,beginner" href="./string#bytesize">byteSize</a></li>
|
||||
<li><a tags="string,array,intermediate" href="./string#capitalize">capitalize</a></li>
|
||||
<li><a tags="string,regexp,intermediate" href="./string#capitalizeeveryword">capitalizeEveryWord</a></li>
|
||||
<li><a tags="string,regexp,beginner" href="./string#compactwhitespace">compactWhitespace</a></li>
|
||||
<li><a tags="string,array,utility,intermediate" href="./string#csvtoarray">CSVToArray</a></li>
|
||||
<li><a tags="string,array,object,advanced" href="./string#csvtojson">CSVToJSON</a></li>
|
||||
<li><a tags="string,array,intermediate" href="./string#decapitalize">decapitalize</a></li>
|
||||
|
||||
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
@ -415,6 +415,7 @@
|
||||
</h4><ul><li><a tags="string,beginner" href="./string#bytesize">byteSize</a></li>
|
||||
<li><a tags="string,array,intermediate" href="./string#capitalize">capitalize</a></li>
|
||||
<li><a tags="string,regexp,intermediate" href="./string#capitalizeeveryword">capitalizeEveryWord</a></li>
|
||||
<li><a tags="string,regexp,beginner" href="./string#compactwhitespace">compactWhitespace</a></li>
|
||||
<li><a tags="string,array,utility,intermediate" href="./string#csvtoarray">CSVToArray</a></li>
|
||||
<li><a tags="string,array,object,advanced" href="./string#csvtojson">CSVToJSON</a></li>
|
||||
<li><a tags="string,array,intermediate" href="./string#decapitalize">decapitalize</a></li>
|
||||
|
||||
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
@ -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) => {
|
||||
|
||||
577
test/_30s.js
577
test/_30s.js
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user