2929
3030---
3131
32- [ * Example of usage* ] ( https://tinyurl.com/2mknex43 ) :
32+ [ * Example of usage* ] ( https://tinyurl.com/28zqjbun ) :
3333``` js
3434import ' core-js/actual' ;
3535
36- Promise .resolve ( 42 ).then (it => console .log (it)); // => 42
36+ Promise .try (() => 42 ).then (it => console .log (it)); // => 42
3737
3838Array .from (new Set ([1 , 2 , 3 ]).union (new Set ([3 , 4 , 5 ]))); // => [1, 2, 3, 4, 5]
3939
4040[1 , 2 ].flatMap (it => [it, it]); // => [1, 1, 2, 2]
4141
42- ( function * (i ) { while (true ) yield i++ ; })( 1 )
42+ Iterator . concat ([ 1 , 2 ], function * (i ) { while (true ) yield i++ ; }( 3 ) )
4343 .drop (1 ).take (5 )
4444 .filter (it => it % 2 )
4545 .map (it => it ** 2 )
@@ -57,13 +57,13 @@ import 'core-js/actual/array/from';
5757import ' core-js/actual/array/flat-map' ;
5858import ' core-js/actual/structured-clone' ;
5959
60- Promise .resolve ( 42 ).then (it => console .log (it)); // => 42
60+ Promise .try (() => 42 ).then (it => console .log (it)); // => 42
6161
6262Array .from (new Set ([1 , 2 , 3 ]).union (new Set ([3 , 4 , 5 ]))); // => [1, 2, 3, 4, 5]
6363
6464[1 , 2 ].flatMap (it => [it, it]); // => [1, 1, 2, 2]
6565
66- ( function * (i ) { while (true ) yield i++ ; })( 1 )
66+ Iterator . concat ([ 1 , 2 ], function * (i ) { while (true ) yield i++ ; }( 3 ) )
6767 .drop (1 ).take (5 )
6868 .filter (it => it % 2 )
6969 .map (it => it ** 2 )
@@ -81,13 +81,13 @@ import from from 'core-js-pure/actual/array/from';
8181import flatMap from ' core-js-pure/actual/array/flat-map' ;
8282import structuredClone from ' core-js-pure/actual/structured-clone' ;
8383
84- Promise .resolve ( 42 ).then (it => console .log (it)); // => 42
84+ Promise .try (() => 42 ).then (it => console .log (it)); // => 42
8585
8686from (new Set ([1 , 2 , 3 ]).union (new Set ([3 , 4 , 5 ]))); // => [1, 2, 3, 4, 5]
8787
8888flatMap ([1 , 2 ], it => [it, it]); // => [1, 1, 2, 2]
8989
90- Iterator .from ( function * (i ) { while (true ) yield i++ ; }(1 ))
90+ Iterator .concat ([ 1 , 2 ], function * (i ) { while (true ) yield i++ ; }(3 ))
9191 .drop (1 ).take (5 )
9292 .filter (it => it % 2 )
9393 .map (it => it ** 2 )
0 commit comments