core-js-compat 3.37.0 → 3.38.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 +3 -3
- package/compat.js +2 -1
- package/data.json +268 -40
- package/entries.json +131 -1
- package/external.json +0 -0
- package/modules-by-versions.json +4 -0
- package/modules.json +2 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ const {
|
|
|
27
27
|
exclude: [ // optional list / filter of modules to exclude, the signature is similar to `modules` option
|
|
28
28
|
'web.atob',
|
|
29
29
|
],
|
|
30
|
-
version: '3.
|
|
30
|
+
version: '3.38', // used `core-js` version, by default - the latest
|
|
31
31
|
inverse: false, // inverse of the result - shows modules that are NOT required for the target environment
|
|
32
32
|
});
|
|
33
33
|
|
|
@@ -125,9 +125,9 @@ require('core-js-compat/modules'); // => Array<ModuleName>
|
|
|
125
125
|
require('core-js-compat').modules; // => Array<ModuleName>
|
|
126
126
|
|
|
127
127
|
// the subset of modules which available in the passed `core-js` version:
|
|
128
|
-
require('core-js-compat/get-modules-list-for-target-version')('3.
|
|
128
|
+
require('core-js-compat/get-modules-list-for-target-version')('3.38'); // => Array<ModuleName>
|
|
129
129
|
// or
|
|
130
|
-
require('core-js-compat').getModulesListForTargetVersion('3.
|
|
130
|
+
require('core-js-compat').getModulesListForTargetVersion('3.38'); // => Array<ModuleName>
|
|
131
131
|
```
|
|
132
132
|
|
|
133
133
|
If you wanna help to improve this data, you could take a look at the related section of [`CONTRIBUTING.md`](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md#how-to-update-core-js-compat-data). The visualization of compatibility data and the browser tests runner is available [here](http://zloirock.github.io/core-js/compat/), the example:
|
package/compat.js
CHANGED
|
@@ -19,7 +19,8 @@ function getModules(filter) {
|
|
|
19
19
|
if (typeof filter == 'string') {
|
|
20
20
|
if (has(entries, filter)) return entries[filter];
|
|
21
21
|
return atLeastSomeModules(allModules.filter(it => it.startsWith(filter)), filter);
|
|
22
|
-
}
|
|
22
|
+
}
|
|
23
|
+
if (filter instanceof RegExp) return atLeastSomeModules(allModules.filter(it => filter.test(it)), filter);
|
|
23
24
|
throwInvalidFilter(filter);
|
|
24
25
|
}
|
|
25
26
|
|