core-js-bundle 3.22.8 → 3.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -6
- package/index.js +1593 -1357
- package/minified.js +9 -9
- package/minified.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,12 +22,12 @@
|
|
|
22
22
|
|
|
23
23
|
---
|
|
24
24
|
|
|
25
|
-
[*Example of usage*](https://
|
|
25
|
+
[*Example of usage*](https://tinyurl.com/2aj9lkwf):
|
|
26
26
|
```js
|
|
27
27
|
import 'core-js/actual'; // <- at the top of your entry point
|
|
28
28
|
|
|
29
29
|
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
|
|
30
|
-
[1, 2, 3, 4, 5].
|
|
30
|
+
[1, 2, 3, 4, 5].group(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] }
|
|
31
31
|
Promise.resolve(42).then(x => console.log(x)); // => 42
|
|
32
32
|
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
|
|
33
33
|
queueMicrotask(() => console.log('called as microtask'));
|
|
@@ -36,14 +36,14 @@ queueMicrotask(() => console.log('called as microtask'));
|
|
|
36
36
|
*You can load only required features*:
|
|
37
37
|
```js
|
|
38
38
|
import 'core-js/actual/array/from'; // <- at the top of your entry point
|
|
39
|
-
import 'core-js/actual/array/group
|
|
39
|
+
import 'core-js/actual/array/group'; // <- at the top of your entry point
|
|
40
40
|
import 'core-js/actual/set'; // <- at the top of your entry point
|
|
41
41
|
import 'core-js/actual/promise'; // <- at the top of your entry point
|
|
42
42
|
import 'core-js/actual/structured-clone'; // <- at the top of your entry point
|
|
43
43
|
import 'core-js/actual/queue-microtask'; // <- at the top of your entry point
|
|
44
44
|
|
|
45
45
|
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
|
|
46
|
-
[1, 2, 3, 4, 5].
|
|
46
|
+
[1, 2, 3, 4, 5].group(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] }
|
|
47
47
|
Promise.resolve(42).then(x => console.log(x)); // => 42
|
|
48
48
|
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
|
|
49
49
|
queueMicrotask(() => console.log('called as microtask'));
|
|
@@ -52,14 +52,14 @@ queueMicrotask(() => console.log('called as microtask'));
|
|
|
52
52
|
*Or use it without global namespace pollution*:
|
|
53
53
|
```js
|
|
54
54
|
import from from 'core-js-pure/actual/array/from';
|
|
55
|
-
import
|
|
55
|
+
import group from 'core-js-pure/actual/array/group';
|
|
56
56
|
import Set from 'core-js-pure/actual/set';
|
|
57
57
|
import Promise from 'core-js-pure/actual/promise';
|
|
58
58
|
import structuredClone from 'core-js-pure/actual/structured-clone';
|
|
59
59
|
import queueMicrotask from 'core-js-pure/actual/queue-microtask';
|
|
60
60
|
|
|
61
61
|
from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3]
|
|
62
|
-
|
|
62
|
+
group([1, 2, 3, 4, 5], it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] }
|
|
63
63
|
Promise.resolve(42).then(x => console.log(x)); // => 42
|
|
64
64
|
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
|
|
65
65
|
queueMicrotask(() => console.log('called as microtask'));
|