Travis build: 574
This commit is contained in:
72
README.md
72
README.md
@ -221,6 +221,7 @@
|
||||
* [`repeatString`](#repeatstring)
|
||||
* [`reverseString`](#reversestring)
|
||||
* [`sortCharactersInString`](#sortcharactersinstring)
|
||||
* [`splitLines`](#splitlines)
|
||||
* [`toCamelCase`](#tocamelcase)
|
||||
* [`toKebabCase`](#tokebabcase)
|
||||
* [`toSnakeCase`](#tosnakecase)
|
||||
@ -2574,55 +2575,6 @@ Use `Math.max()` combined with the spread operator (`...`) to get the maximum va
|
||||
```js
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const max = (...arr) => Math.max(...[].concat(...arr);
|
||||
```
|
||||
|
||||
@ -3455,6 +3407,28 @@ sortCharactersInString('cabbage'); // 'aabbceg'
|
||||
<br>[⬆ Back to top](#table-of-contents)
|
||||
|
||||
|
||||
### splitLines
|
||||
|
||||
Splits a multiline string into an array of lines.
|
||||
|
||||
Use `String.split()` and a regular expression to match line breaks and create an array.
|
||||
|
||||
```js
|
||||
const splitLines = str => str.split(/\r?\n/);
|
||||
```
|
||||
|
||||
<details>
|
||||
<summary>Examples</summary>
|
||||
|
||||
```js
|
||||
splitLines('This\nis a\nmultiline\nstring.\n'); // ['This', 'is a', 'multiline', 'string' , '']
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<br>[⬆ Back to top](#table-of-contents)
|
||||
|
||||
|
||||
### toCamelCase
|
||||
|
||||
Converts a string to camelcase.
|
||||
|
||||
Reference in New Issue
Block a user