Fix whitespace problems
This commit is contained in:
@ -15,7 +15,6 @@ Uses a separator and an end separator.
|
|||||||
- Omit the third argument, `end`, to use the same value as `separator` by default.
|
- Omit the third argument, `end`, to use the same value as `separator` by default.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
||||||
const join = (arr, separator = ',', end = separator) =>
|
const join = (arr, separator = ',', end = separator) =>
|
||||||
arr.reduce(
|
arr.reduce(
|
||||||
(acc, val, i) =>
|
(acc, val, i) =>
|
||||||
|
|||||||
@ -14,7 +14,6 @@ Mutates an array by removing elements for which the given function returns `fals
|
|||||||
- The callback function is invoked with three arguments (value, index, array).
|
- The callback function is invoked with three arguments (value, index, array).
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
||||||
const remove = (arr, func) =>
|
const remove = (arr, func) =>
|
||||||
Array.isArray(arr)
|
Array.isArray(arr)
|
||||||
? arr.filter(func).reduce((acc, val) => {
|
? arr.filter(func).reduce((acc, val) => {
|
||||||
|
|||||||
@ -16,7 +16,6 @@ Gets the size of an array, object or string.
|
|||||||
- Split strings into array of characters with `String.prototype.split()` and return its length.
|
- Split strings into array of characters with `String.prototype.split()` and return its length.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|
||||||
const size = val =>
|
const size = val =>
|
||||||
Array.isArray(val)
|
Array.isArray(val)
|
||||||
? val.length
|
? val.length
|
||||||
|
|||||||
Reference in New Issue
Block a user