Skip to content

Commit c44b668

Browse files
committed
update docs
1 parent 87cef2f commit c44b668

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## Changelog
22
##### Unreleased
3+
- [`Array` grouping proposal](https://github.com/tc39/proposal-array-grouping):
4+
- Moved to the stage 2
5+
- Added `Array.prototype.groupByMap` method
6+
- Removed `@@species` support
37
- Added [change `Array` by copy stage 2 proposal](https://github.com/tc39/proposal-change-array-by-copy):
48
- `Array.prototype.toReversed`
59
- `Array.prototype.toSorted`

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ Promise.resolve(32).then(x => console.log(x)); // => 32
101101
- [`Iterator` helpers](#iterator-helpers)
102102
- [New `Set` methods](#new-set-methods)
103103
- [`Map.prototype.emplace`](#mapprototypeemplace)
104+
- [`Array` grouping](#array-grouping)
104105
- [Change `Array` by copy](#change-array-by-copy)
105106
- [`Array.isTemplateObject`](#arrayistemplateobject)
106107
- [`Symbol.{ asyncDispose, dispose }` for `using` statement](#symbol-asyncdispose-dispose--for-using-statement)
@@ -112,7 +113,6 @@ Promise.resolve(32).then(x => console.log(x)); // => 32
112113
- [`compositeKey` and `compositeSymbol`](#compositekey-and-compositesymbol)
113114
- [`Array.fromAsync`](#arrayfromasync)
114115
- [`Array` filtering](#array-filtering)
115-
- [`Array` grouping](#array-grouping)
116116
- [`Array` deduplication](#array-deduplication)
117117
- [Getting last item from `Array`](#getting-last-item-from-array)
118118
- [`Number.range`](#numberrange)
@@ -2353,7 +2353,7 @@ console.log(compositeSymbol(1, a, 2, b) === compositeSymbol(1, a, 2, b)); // =>
23532353
console.log(compositeSymbol(a, a) === compositeSymbol(a, a)); // => true
23542354
```
23552355
##### [`Array.fromAsync`](https://github.com/tc39/proposal-array-from-async)[⬆](#index)
2356-
Modules [`esnext.array.from-async`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.from-async.js) and [`esnext.typed-array.from-async`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.typed-array.from-async.js)
2356+
Modules [`esnext.array.from-async`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.from-async.js).
23572357
```js
23582358
class Array {
23592359
static fromAsync(asyncItems: AsyncIterable | Iterable | ArrayLike, mapfn?: (value: any, index: number) => any, thisArg?: any): Array;
@@ -2390,7 +2390,7 @@ core-js/features/typed-array/filter-reject
23902390
[1, 2, 3, 4, 5].filterReject(it => it % 2); // => [2, 4]
23912391
````
23922392
##### [`Array` grouping](#https://github.com/tc39/proposal-array-grouping)[⬆](#index)
2393-
Modules [`esnext.array.group-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.group-by.js).
2393+
Modules [`esnext.array.group-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.group-by.js), [`esnext.array.group-by-map`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.group-by-map.js).
23942394
```js
23952395
class Array {
23962396
groupBy(callbackfn: (value: any, index: number, target: any) => key, thisArg?: any): { [key]: Array<mixed> };
@@ -2401,10 +2401,14 @@ class Array {
24012401
```
24022402
core-js/proposals/array-grouping
24032403
core-js(-pure)/features/array(/virtual)/group-by
2404+
core-js(-pure)/features/array(/virtual)/group-by-map
24042405
```
2405-
[*Examples*](t.ly/VggI):
2406+
[*Examples*](t.ly/xEqc):
24062407
```js
24072408
[1, 2, 3, 4, 5].groupBy(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] }
2409+
const map = [1, 2, 3, 4, 5].groupByMap(it => it % 2);
2410+
map.get(1); // => [1, 3, 5]
2411+
map.get(0); // => [2, 4]
24082412
````
24092413
##### [Array deduplication](https://github.com/tc39/proposal-array-unique)[⬆](#index)
24102414
Modules [`esnext.array.unique-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.unique-by.js) and [`esnext.typed-array.unique-by`](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.typed-array.unique-by.js)
@@ -3076,4 +3080,4 @@ console.log(getIteratorMethod({})); // undefined
30763080
- ES `Proxy` can't be polyfilled, you can try to use [`proxy-polyfill`](https://github.com/GoogleChrome/proxy-polyfill) which provides a very little subset of features.
30773081
- ES `String#normalize` is not a very useful feature, but this polyfill will be very large. If you need it, you can use [unorm](https://github.com/walling/unorm/).
30783082
- ECMA-402 `Intl` is missed because of the size. You can use [those polyfills](https://formatjs.io/docs/polyfills).
3079-
- `window.fetch` is not a cross-platform feature, in some environments, it makes no sense. For this reason, I don't think it should be in `core-js`. Looking at a large number of requests it *might be* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).
3083+
- `window.fetch` is not a cross-platform feature, in some environments, it makes no sense. For this reason, I don't think it should be in `core-js`. Looking at a large number of requests it *might be* added in the future. Now you can use, for example, [this polyfill](https://github.com/github/fetch).

0 commit comments

Comments
 (0)