2828
2929---
3030
31- [ * Example of usage* ] ( https://is.gd/XD4mRe ) :
31+ [ * Example of usage* ] ( https://tinyurl.com/2aj9lkwf ) :
3232``` js
3333import ' core-js/actual' ; // <- at the top of your entry point
3434
3535Array .from (new Set ([1 , 2 , 3 , 2 , 1 ])); // => [1, 2, 3]
36- [1 , 2 , 3 , 4 , 5 ].groupBy (it => it % 2 ); // => { 1: [1, 3, 5], 0: [2, 4] }
36+ [1 , 2 , 3 , 4 , 5 ].group (it => it % 2 ); // => { 1: [1, 3, 5], 0: [2, 4] }
3737Promise .resolve (42 ).then (x => console .log (x)); // => 42
3838structuredClone (new Set ([1 , 2 , 3 ])); // => new Set([1, 2, 3])
3939queueMicrotask (() => console .log (' called as microtask' ));
@@ -42,14 +42,14 @@ queueMicrotask(() => console.log('called as microtask'));
4242* You can load only required features* :
4343``` js
4444import ' core-js/actual/array/from' ; // <- at the top of your entry point
45- import ' core-js/actual/array/group-by ' ; // <- at the top of your entry point
45+ import ' core-js/actual/array/group' ; // <- at the top of your entry point
4646import ' core-js/actual/set' ; // <- at the top of your entry point
4747import ' core-js/actual/promise' ; // <- at the top of your entry point
4848import ' core-js/actual/structured-clone' ; // <- at the top of your entry point
4949import ' core-js/actual/queue-microtask' ; // <- at the top of your entry point
5050
5151Array .from (new Set ([1 , 2 , 3 , 2 , 1 ])); // => [1, 2, 3]
52- [1 , 2 , 3 , 4 , 5 ].groupBy (it => it % 2 ); // => { 1: [1, 3, 5], 0: [2, 4] }
52+ [1 , 2 , 3 , 4 , 5 ].group (it => it % 2 ); // => { 1: [1, 3, 5], 0: [2, 4] }
5353Promise .resolve (42 ).then (x => console .log (x)); // => 42
5454structuredClone (new Set ([1 , 2 , 3 ])); // => new Set([1, 2, 3])
5555queueMicrotask (() => console .log (' called as microtask' ));
@@ -58,14 +58,14 @@ queueMicrotask(() => console.log('called as microtask'));
5858* Or use it without global namespace pollution* :
5959``` js
6060import from from ' core-js-pure/actual/array/from' ;
61- import groupBy from ' core-js-pure/actual/array/group-by ' ;
61+ import group from ' core-js-pure/actual/array/group' ;
6262import Set from ' core-js-pure/actual/set' ;
6363import Promise from ' core-js-pure/actual/promise' ;
6464import structuredClone from ' core-js-pure/actual/structured-clone' ;
6565import queueMicrotask from ' core-js-pure/actual/queue-microtask' ;
6666
6767from (new Set ([1 , 2 , 3 , 2 , 1 ])); // => [1, 2, 3]
68- groupBy ([1 , 2 , 3 , 4 , 5 ], it => it % 2 ); // => { 1: [1, 3, 5], 0: [2, 4] }
68+ group ([1 , 2 , 3 , 4 , 5 ], it => it % 2 ); // => { 1: [1, 3, 5], 0: [2, 4] }
6969Promise .resolve (42 ).then (x => console .log (x)); // => 42
7070structuredClone (new Set ([1 , 2 , 3 ])); // => new Set([1, 2, 3])
7171queueMicrotask (() => console .log (' called as microtask' ));
0 commit comments