@@ -1937,7 +1937,28 @@ core-js(-pure)/es|stable|features/typed-array/at
1937
1937
` ` ` js
1938
1938
core-js(-pure)/stage/3
1939
1939
` ` `
1940
+ ##### [` Array` grouping](#https: // github.com/tc39/proposal-array-grouping)[⬆](#index)
1941
+ 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).
1942
+ ` ` ` js
1943
+ class Array {
1944
+ groupBy(callbackfn: (value: any, index: number, target: any) => key, thisArg?: any): { [key]: Array<mixed> };
1945
+ groupByMap(callbackfn: (value: any, index: number, target: any) => key, thisArg?: any): Map<key, Array<mixed>>;
1946
+ }
1947
+ ` ` `
1948
+ [* CommonJS entry points: * ](#commonjs- api)
1949
+ ` ` `
1950
+ core-js/proposals/array-grouping
1951
+ core-js(-pure)/features/array(/virtual)/group-by
1952
+ core-js(-pure)/features/array(/virtual)/group-by-map
1953
+ ` ` `
1954
+ [* Examples* ](t .ly / xEqc):
1955
+ ` ` ` js
1956
+ [1, 2, 3, 4, 5].groupBy(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] }
1940
1957
1958
+ const map = [1, 2, 3, 4, 5].groupByMap(it => it % 2);
1959
+ map.get(1); // => [1, 3, 5]
1960
+ map.get(0); // => [2, 4]
1961
+ ` ` ` `
1941
1962
##### [Array find from last](https://github.com/tc39/proposal-array-find-from-last)[⬆](#index)
1942
1963
Modules [` esnext .array .find - last` ](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.find-last.js), [` esnext .array .find - last- index` ](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.array.find-last-index.js), [` esnext .typed - array .find - last` ](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.typed-array.find-last.js) and [` esnext .typed - array .find - last- index` ](https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.typed-array.find-last-index.js).
1943
1964
` ` ` js
@@ -2438,27 +2459,6 @@ core-js/features/typed-array/filter-reject
2438
2459
` ` ` js
2439
2460
[1, 2, 3, 4, 5].filterReject(it => it % 2); // => [2, 4]
2440
2461
` ` ` `
2441
- ##### [` Array ` grouping](#https://github.com/tc39/proposal-array-grouping)[⬆](#index)
2442
- 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).
2443
- ` ` ` js
2444
- class Array {
2445
- groupBy (callbackfn : (value : any , index : number , target : any ) => key, thisArg?: any): { [key]: Array < mixed> };
2446
- groupByMap (callbackfn : (value : any , index : number , target : any ) => key, thisArg?: any): Map < key, Array < mixed>> ;
2447
- }
2448
- ` ` `
2449
- [*CommonJS entry points:*](#commonjs-api)
2450
- ` ` `
2451
- core- js/ proposals/ array- grouping
2452
- core- js (- pure)/ features/ array (/ virtual)/ g roup- by
2453
- core- js (- pure)/ features/ array (/ virtual)/ g roup- by- map
2454
- ` ` `
2455
- [*Examples*](t.ly/xEqc):
2456
- ` ` ` js
2457
- [1 , 2 , 3 , 4 , 5 ].groupBy (it => it % 2 ); // => { 1: [1, 3, 5], 0: [2, 4] }
2458
- const map = [1 , 2 , 3 , 4 , 5 ].groupByMap (it => it % 2 );
2459
- map .get (1 ); // => [1, 3, 5]
2460
- map .get (0 ); // => [2, 4]
2461
- ` ` ` `
2462
2462
##### [Array deduplication](https://github.com/tc39/proposal-array-unique)[⬆](#index)
2463
2463
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)
2464
2464
` ` ` js
0 commit comments