Build README
This commit is contained in:
@ -113,8 +113,7 @@ var curry = f =>
|
|||||||
Use `filter()` to remove values that are part of `values`, determined using `includes()`.
|
Use `filter()` to remove values that are part of `values`, determined using `includes()`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var difference = (arr, values) =>
|
var difference = (arr, values) => arr.filter(v => !values.includes(v));
|
||||||
arr.filter(v => !values.includes(v));
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Distance between two points
|
### Distance between two points
|
||||||
@ -327,8 +326,7 @@ var scrollToTop = _ => {
|
|||||||
Use `filter()` to remove values that are not part of `values`, determined using `includes()`.
|
Use `filter()` to remove values that are not part of `values`, determined using `includes()`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var difference = (arr, values) =>
|
var difference = (arr, values) => arr.filter(v => values.includes(v));
|
||||||
arr.filter(v => values.includes(v));
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### Sort characters in string (alphabetical)
|
### Sort characters in string (alphabetical)
|
||||||
@ -367,7 +365,6 @@ var tail = arr => arr.slice(1);
|
|||||||
|
|
||||||
### Unique values of array
|
### Unique values of array
|
||||||
|
|
||||||
|
|
||||||
Use ES6 `Set` and the `...rest` operator to discard all duplicated values.
|
Use ES6 `Set` and the `...rest` operator to discard all duplicated values.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
### Difference between arrays
|
### Difference between arrays
|
||||||
|
|
||||||
Use `filter()` to remove values that are part of `values`, determined using `indexOf()`.
|
Use `filter()` to remove values that are part of `values`, determined using `includes()`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var difference = (arr, values) =>
|
var difference = (arr, values) => arr.filter(v => !values.includes(v));
|
||||||
arr.filter(v => values.indexOf(v) === -1);
|
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,8 +1,7 @@
|
|||||||
### Similarity between arrays
|
### Similarity between arrays
|
||||||
|
|
||||||
Use `filter()` to remove values that are not part of `values`, determined using `indexOf()`.
|
Use `filter()` to remove values that are not part of `values`, determined using `includes()`.
|
||||||
|
|
||||||
```js
|
```js
|
||||||
var difference = (arr, values) =>
|
var difference = (arr, values) => arr.filter(v => values.includes(v));
|
||||||
arr.filter(v => values.indexOf(v) !== -1);
|
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user