Travis build: 574

This commit is contained in:
Travis CI
2017-12-29 13:06:32 +00:00
parent d7c023d3b3
commit 247ffead09
3 changed files with 32 additions and 98 deletions

View File

@ -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.