@@ -169,12 +169,12 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
169169 - [ ` Math.sumPrecise ` ] ( #mathsumprecise )
170170 - [ Stage 3 proposals] ( #stage-3-proposals )
171171 - [ ` Iterator ` sequencing] ( #iterator-sequencing )
172+ - [ Joint iteration] ( #joint-iteration )
172173 - [ ` Map ` upsert] ( #map-upsert )
173174 - [ ` JSON.parse ` source text access] ( #jsonparse-source-text-access )
174175 - [ ` Symbol.metadata ` for decorators metadata proposal] ( #symbolmetadata-for-decorators-metadata-proposal )
175176 - [ Stage 2.7 proposals] ( #stage-27-proposals )
176177 - [ ` Iterator ` chunking] ( #iterator-chunking )
177- - [ Joint iteration] ( #joint-iteration )
178178 - [ Stage 2 proposals] ( #stage-2-proposals )
179179 - [ ` AsyncIterator ` helpers] ( #asynciterator-helpers )
180180 - [ ` Iterator.range ` ] ( #iteratorrange )
@@ -2707,6 +2707,57 @@ Iterator.concat([0, 1].values(), [2, 3], function * () {
27072707}()).toArray (); // => [0, 1, 2, 3, 4, 5]
27082708```
27092709
2710+ ##### [ Joint iteration] ( https://github.com/tc39/proposal-joint-iteration ) [ ⬆] ( #index )
2711+ Modules [ esnext.iterator.zip] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.zip.js ) , [ esnext.iterator.zip-keyed] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.zip-keyed.js )
2712+ ``` ts
2713+ class Iterator {
2714+ zip<T extends readonly Iterable <unknown >[]>(
2715+ iterables : T ,
2716+ options ? : {
2717+ mode? : ' shortest' | ' longest' | ' strict' ;
2718+ padding? : { [K in keyof T ]? : T [K ] extends Iterable <infer U > ? U : never };
2719+ }
2720+ ): IterableIterator <{ [K in keyof T ]: T [K ] extends Iterable <infer U > ? U : never }>;
2721+ zipKeyed<K extends PropertyKey , V extends Record <K , Iterable <unknown >>>(
2722+ iterables : V ,
2723+ options ? : {
2724+ mode? : ' shortest' | ' longest' | ' strict' ;
2725+ padding? : { [P in keyof V ]? : V [P ] extends Iterable <infer U > ? U : never };
2726+ }
2727+ ): IterableIterator <{ [P in keyof V ]: V [P ] extends Iterable <infer U > ? U : never }>;
2728+ }
2729+ ```
2730+ [ * CommonJS entry points:* ] ( #commonjs-api )
2731+ ```
2732+ core-js/proposals/joint-iteration
2733+ core-js(-pure)/actual|full/iterator/zip
2734+ core-js(-pure)/actual|full/iterator/zip-keyed
2735+ ```
2736+ [ * Example* ] ( https://tinyurl.com/vutnf2nu ) :
2737+ ``` js
2738+ Iterator .zip ([
2739+ [0 , 1 , 2 ],
2740+ [3 , 4 , 5 ],
2741+ ]).toArray (); // => [[0, 3], [1, 4], [2, 5]]
2742+
2743+ Iterator .zipKeyed ({
2744+ a: [0 , 1 , 2 ],
2745+ b: [3 , 4 , 5 , 6 ],
2746+ c: [7 , 8 , 9 ],
2747+ }, {
2748+ mode: ' longest' ,
2749+ padding: { c: 10 },
2750+ }).toArray ();
2751+ /*
2752+ [
2753+ { a: 0, b: 3, c: 7 },
2754+ { a: 1, b: 4, c: 8 },
2755+ { a: 2, b: 5, c: 9 },
2756+ { a: undefined, b: 6, c: 10 },
2757+ ];
2758+ */
2759+ ```
2760+
27102761##### [ ` Map ` upsert] ( https://github.com/thumbsupep/proposal-upsert ) [ ⬆] ( #index )
27112762Modules [ ` esnext.map.get-or-insert ` ] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.get-or-insert.js ) , [ ` esnext.map.get-or-insert-computed ` ] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.map.get-or-insert-computed.js ) , [ ` esnext.weak-map.get-or-insert ` ] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-map.get-or-insert.js ) and [ ` esnext.weak-map.get-or-insert-computed ` ] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.weak-map.get-or-insert-computed.js )
27122763``` ts
@@ -2835,57 +2886,6 @@ let windowsPartial = Array.from([0, 1].values().windows(3, 'allow-partial')); /
28352886let windowsFull = Array .from ([0 , 1 ].values ().windows (3 )); // []
28362887```
28372888
2838- ##### [ Joint iteration] ( https://github.com/tc39/proposal-joint-iteration ) [ ⬆] ( #index )
2839- Modules [ esnext.iterator.zip] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.zip.js ) , [ esnext.iterator.zip-keyed] ( https://github.com/zloirock/core-js/blob/master/packages/core-js/modules/esnext.iterator.zip-keyed.js )
2840- ``` ts
2841- class Iterator {
2842- zip<T extends readonly Iterable <unknown >[]>(
2843- iterables : T ,
2844- options ? : {
2845- mode? : ' shortest' | ' longest' | ' strict' ;
2846- padding? : { [K in keyof T ]? : T [K ] extends Iterable <infer U > ? U : never };
2847- }
2848- ): IterableIterator <{ [K in keyof T ]: T [K ] extends Iterable <infer U > ? U : never }>;
2849- zipKeyed<K extends PropertyKey , V extends Record <K , Iterable <unknown >>>(
2850- iterables : V ,
2851- options ? : {
2852- mode? : ' shortest' | ' longest' | ' strict' ;
2853- padding? : { [P in keyof V ]? : V [P ] extends Iterable <infer U > ? U : never };
2854- }
2855- ): IterableIterator <{ [P in keyof V ]: V [P ] extends Iterable <infer U > ? U : never }>;
2856- }
2857- ```
2858- [ * CommonJS entry points:* ] ( #commonjs-api )
2859- ```
2860- core-js/proposals/joint-iteration
2861- core-js(-pure)/full/iterator/zip
2862- core-js(-pure)/full/iterator/zip-keyed
2863- ```
2864- [ * Example* ] ( https://tinyurl.com/vutnf2nu ) :
2865- ``` js
2866- Iterator .zip ([
2867- [0 , 1 , 2 ],
2868- [3 , 4 , 5 ],
2869- ]).toArray (); // => [[0, 3], [1, 4], [2, 5]]
2870-
2871- Iterator .zipKeyed ({
2872- a: [0 , 1 , 2 ],
2873- b: [3 , 4 , 5 , 6 ],
2874- c: [7 , 8 , 9 ],
2875- }, {
2876- mode: ' longest' ,
2877- padding: { c: 10 },
2878- }).toArray ();
2879- /*
2880- [
2881- { a: 0, b: 3, c: 7 },
2882- { a: 1, b: 4, c: 8 },
2883- { a: 2, b: 5, c: 9 },
2884- { a: undefined, b: 6, c: 10 },
2885- ];
2886- */
2887- ```
2888-
28892889#### Stage 2 proposals[ ⬆] ( #index )
28902890[ * CommonJS entry points:* ] ( #commonjs-api )
28912891```
0 commit comments