feat: refactoring project

This commit is contained in:
Carlos
2024-11-23 14:56:07 -05:00
parent f0c2a50c18
commit 1c6db5818d
2351 changed files with 39323 additions and 60326 deletions

View File

@@ -27,7 +27,7 @@ const {
exclude: [ // optional list / filter of modules to exclude, the signature is similar to `modules` option
'web.atob',
],
version: '3.38', // used `core-js` version, by default - the latest
version: '3.39', // used `core-js` version, by default - the latest
inverse: false, // inverse of the result - shows modules that are NOT required for the target environment
});
@@ -72,9 +72,9 @@ console.log(targets);
`targets` could be [a `browserslist` query](https://github.com/browserslist/browserslist) or a targets object that specifies minimum environment versions to support:
```js
// browserslist query:
'defaults, not IE 11, maintained node versions'
'defaults, not IE 11, maintained node versions';
// object (sure, all those fields optional):
{
({
android: '4.0', // Android WebView version
bun: '0.1.2', // Bun version
chrome: '38', // Chrome version
@@ -98,7 +98,7 @@ console.log(targets);
samsung: '14.0', // Samsung Internet version
esmodules: true, // That option set target to minimum supporting ES Modules versions of all browsers
browsers: '> 0.25%', // Browserslist query or object with target browsers
}
});
```
### Additional API:
@@ -125,9 +125,9 @@ require('core-js-compat/modules'); // => Array<ModuleName>
require('core-js-compat').modules; // => Array<ModuleName>
// the subset of modules which available in the passed `core-js` version:
require('core-js-compat/get-modules-list-for-target-version')('3.38'); // => Array<ModuleName>
require('core-js-compat/get-modules-list-for-target-version')('3.39'); // => Array<ModuleName>
// or
require('core-js-compat').getModulesListForTargetVersion('3.38'); // => Array<ModuleName>
require('core-js-compat').getModulesListForTargetVersion('3.39'); // => Array<ModuleName>
```
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: