Skip to content

Commit

Permalink
Merge dfd4a3d into f351692
Browse files Browse the repository at this point in the history
  • Loading branch information
terrierscript committed May 4, 2019
2 parents f351692 + dfd4a3d commit 0520ace
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Expand Up @@ -455,6 +455,9 @@ Flattens array a single level deep.
const flatten = [1, [2, [3, [4]], 5]].reduce( (a, b) => a.concat(b), [])
// => [1, 2, [3, [4]], 5]

// Native(ES2019)
const flatten = [1, [2, [3, [4]], 5]].flat()
// => [1, 2, [3, [4]], 5]
```

#### Browser Support for `Array.prototype.reduce()`
Expand All @@ -463,6 +466,14 @@ Flattens array a single level deep.
:-: | :-: | :-: | :-: | :-: | :-: |
46.0 ✔ | ✔ | 3.0 ✔ | 9.0 ✔ | 10.5 ✔ | 4 ✔ |

#### Browser Support for `Array.prototype.flat()`


![Chrome][chrome-image] | ![Edge][edge-image] | ![Firefox][firefox-image] | ![IE][ie-image] | ![Opera][opera-image] | ![Safari][safari-image] |
:-: | :-: | :-: | :-: | :-: | :-: |
69 ✔ | ✖ | 62 ✔ | ✖ | 56 ✔ | 12 ✔ |


**[⬆ back to top](#quick-links)**

### _.flattenDeep
Expand All @@ -481,6 +492,11 @@ Recursively flattens array.

flattenDeep([1, [[2], [3, [4]], 5]])
// => [1, 2, 3, 4, 5]

// Native(ES2019)
[1, [2, [3, [4]], 5]].flat(Infinity)
// => [1, 2, 3, 4, 5]

```

#### Browser Support
Expand All @@ -489,6 +505,13 @@ Recursively flattens array.
:-: | :-: | :-: | :-: | :-: | :-: |
46.0 ✔ | ✔ | 16.0 ✔ | ✖ | 37.0 ✔ | 7.1 ✔ |


#### Browser Support for `Array.prototype.flat()`

![Chrome][chrome-image] | ![Edge][edge-image] | ![Firefox][firefox-image] | ![IE][ie-image] | ![Opera][opera-image] | ![Safari][safari-image] |
:-: | :-: | :-: | :-: | :-: | :-: |
69 ✔ | ✖ | 62 ✔ | ✖ | 56 ✔ | 12 ✔ |

**[⬆ back to top](#quick-links)**

### _.fromPairs
Expand Down

0 comments on commit 0520ace

Please sign in to comment.