core-js-compat 3.14.0 → 3.16.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 +31 -4
- package/data.json +491 -33
- package/entries.json +581 -165
- package/external.json +2 -1
- package/modules-by-versions.json +16 -1
- package/modules.json +12 -1
- package/package.json +2 -2
- package/targets-parser.js +7 -1
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@ const {
|
|
|
7
7
|
} = require('core-js-compat')({
|
|
8
8
|
targets: '> 2.5%', // browserslist query or object of minimum environment versions to support
|
|
9
9
|
filter: /^(es|web)\./, // optional filter - string-prefix, regexp or list of modules
|
|
10
|
-
version: '3.
|
|
10
|
+
version: '3.16', // used `core-js` version, by default - the latest
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
console.log(targets);
|
|
@@ -41,7 +41,34 @@ console.log(targets);
|
|
|
41
41
|
*/
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
### `targets` option
|
|
45
|
+
`targets` could be [a `browserslist` query](https://github.com/browserslist/browserslist) or a targets object that specifies minimum environment versions to support:
|
|
46
|
+
```js
|
|
47
|
+
// browserslist query:
|
|
48
|
+
'defaults, not IE 11, maintained node versions'
|
|
49
|
+
// object:
|
|
50
|
+
{
|
|
51
|
+
android: '4.0', // Android WebView version
|
|
52
|
+
chrome: '38', // Chrome version
|
|
53
|
+
deno: '1.12', // Deno version
|
|
54
|
+
edge: '13', // Edge version
|
|
55
|
+
electron: '5.0', // Electron framework version
|
|
56
|
+
firefox: '15', // Firefox version
|
|
57
|
+
ie: '8', // Internet Explorer version
|
|
58
|
+
ios: '13.0', // iOS Safari version
|
|
59
|
+
node: 'current', // NodeJS version, you could use 'current' for set it to currently used
|
|
60
|
+
opera: '12', // Opera version
|
|
61
|
+
opera_mobile: '7', // Opera Mobile version
|
|
62
|
+
phantom: '1.9', // PhantomJS headless browser version
|
|
63
|
+
rhino: '1.7.13', // Rhino engine version
|
|
64
|
+
safari: '14.0', // Safari version
|
|
65
|
+
samsung: '14.0', // Samsung Internet version
|
|
66
|
+
esmodules: true, // That option set target to minimum supporting ES Modules versions of all browsers
|
|
67
|
+
browsers: '> 0.25%', // Browserslist query or object with target browsers
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Additional API:
|
|
45
72
|
|
|
46
73
|
```js
|
|
47
74
|
// equals of of the method from the example above
|
|
@@ -65,9 +92,9 @@ require('core-js-compat/modules'); // => Array<ModuleName>
|
|
|
65
92
|
require('core-js-compat').modules; // => Array<ModuleName>
|
|
66
93
|
|
|
67
94
|
// the subset of modules which available in the passed `core-js` version:
|
|
68
|
-
require('core-js-compat/get-modules-list-for-target-version')('3.
|
|
95
|
+
require('core-js-compat/get-modules-list-for-target-version')('3.16'); // => Array<ModuleName>
|
|
69
96
|
// or
|
|
70
|
-
require('core-js-compat').getModulesListForTargetVersion('3.
|
|
97
|
+
require('core-js-compat').getModulesListForTargetVersion('3.16'); // => Array<ModuleName>
|
|
71
98
|
```
|
|
72
99
|
|
|
73
100
|
If you want to add new / update data about modules required for target engines, [follow this instruction](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md#updating-core-js-compat-data).
|