core-js-bundle
Advanced tools
Comparing version
{ | ||
"name": "core-js-bundle", | ||
"description": "Standard library", | ||
"version": "3.19.3", | ||
"version": "3.20.0", | ||
"repository": { | ||
@@ -57,3 +57,3 @@ "type": "git", | ||
}, | ||
"gitHead": "7dae270c1acf496ba701acfc6272453d7c06aa53" | ||
"gitHead": "29590d0f9f1ef51856b8498da76c316712ac7fae" | ||
} |
@@ -1,2 +0,2 @@ | ||
# core-js-bundle | ||
 | ||
@@ -25,3 +25,3 @@ [](https://opencollective.com/core-js) [](https://www.npmjs.com/package/core-js) [](https://npm-stat.com/charts.html?package=core-js&package=core-js-pure&package=core-js-compat&from=2014-11-18) [](https://npm-stat.com/charts.html?package=core-js&package=core-js-pure&package=core-js-compat&from=2014-11-18) [](https://github.com/zloirock/core-js/actions) [](https://github.com/zloirock/core-js/actions) | ||
[*Example*](http://goo.gl/a2xexl): | ||
[*Example of usage*](https://is.gd/XD4mRe): | ||
```js | ||
@@ -31,4 +31,6 @@ import 'core-js'; // <- at the top of your entry point | ||
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] | ||
[1, [2, 3], [4, [5]]].flat(2); // => [1, 2, 3, 4, 5] | ||
Promise.resolve(32).then(x => console.log(x)); // => 32 | ||
[1, 2, 3, 4, 5].groupBy(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } | ||
Promise.resolve(42).then(x => console.log(x)); // => 42 | ||
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) | ||
queueMicrotask(() => console.log('called as microtask')); | ||
``` | ||
@@ -38,10 +40,14 @@ | ||
```js | ||
import 'core-js/features/array/from'; // <- at the top of your entry point | ||
import 'core-js/features/array/flat'; // <- at the top of your entry point | ||
import 'core-js/features/set'; // <- at the top of your entry point | ||
import 'core-js/features/promise'; // <- at the top of your entry point | ||
import 'core-js/actual/array/from'; // <- at the top of your entry point | ||
import 'core-js/actual/array/group-by'; // <- at the top of your entry point | ||
import 'core-js/actual/set'; // <- at the top of your entry point | ||
import 'core-js/actual/promise'; // <- at the top of your entry point | ||
import 'core-js/actual/structured-clone'; // <- at the top of your entry point | ||
import 'core-js/actual/queue-microtask'; // <- at the top of your entry point | ||
Array.from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] | ||
[1, [2, 3], [4, [5]]].flat(2); // => [1, 2, 3, 4, 5] | ||
Promise.resolve(32).then(x => console.log(x)); // => 32 | ||
[1, 2, 3, 4, 5].groupBy(it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } | ||
Promise.resolve(42).then(x => console.log(x)); // => 42 | ||
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) | ||
queueMicrotask(() => console.log('called as microtask')); | ||
``` | ||
@@ -51,12 +57,16 @@ | ||
```js | ||
import from from 'core-js-pure/features/array/from'; | ||
import flat from 'core-js-pure/features/array/flat'; | ||
import Set from 'core-js-pure/features/set'; | ||
import Promise from 'core-js-pure/features/promise'; | ||
import from from 'core-js-pure/actual/array/from'; | ||
import groupBy from 'core-js-pure/actual/array/group-by'; | ||
import Set from 'core-js-pure/actual/set'; | ||
import Promise from 'core-js-pure/actual/promise'; | ||
import structuredClone from 'core-js-pure/actual/structured-clone'; | ||
import queueMicrotask from 'core-js-pure/actual/queue-microtask'; | ||
from(new Set([1, 2, 3, 2, 1])); // => [1, 2, 3] | ||
flat([1, [2, 3], [4, [5]]], 2); // => [1, 2, 3, 4, 5] | ||
Promise.resolve(32).then(x => console.log(x)); // => 32 | ||
groupBy([1, 2, 3, 4, 5], it => it % 2); // => { 1: [1, 3, 5], 0: [2, 4] } | ||
Promise.resolve(42).then(x => console.log(x)); // => 42 | ||
structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3]) | ||
queueMicrotask(() => console.log('called as microtask')); | ||
``` | ||
**It's a bundled global version, for more info see [`core-js` documentation](https://github.com/zloirock/core-js/blob/master/README.md).** |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1218731
8.93%18481
8.16%69
16.95%