core-js-compat
Advanced tools
Comparing version 3.15.2 to 3.16.0
@@ -5,2 +5,3 @@ { | ||
"chrome": "61", | ||
"deno": "1.0", | ||
"edge": "16", | ||
@@ -14,2 +15,2 @@ "firefox": "60", | ||
} | ||
} | ||
} |
@@ -389,3 +389,9 @@ { | ||
"es.unescape" | ||
], | ||
"3.16": [ | ||
"esnext.array.filter-reject", | ||
"esnext.array.group-by", | ||
"esnext.typed-array.filter-reject", | ||
"esnext.typed-array.group-by" | ||
] | ||
} | ||
} |
@@ -223,4 +223,6 @@ [ | ||
"esnext.array.filter-out", | ||
"esnext.array.filter-reject", | ||
"esnext.array.find-last", | ||
"esnext.array.find-last-index", | ||
"esnext.array.group-by", | ||
"esnext.array.is-template-object", | ||
@@ -345,4 +347,6 @@ "esnext.array.last-index", | ||
"esnext.typed-array.filter-out", | ||
"esnext.typed-array.filter-reject", | ||
"esnext.typed-array.find-last", | ||
"esnext.typed-array.find-last-index", | ||
"esnext.typed-array.group-by", | ||
"esnext.typed-array.unique-by", | ||
@@ -366,2 +370,2 @@ "esnext.weak-map.delete-all", | ||
"web.url-search-params" | ||
] | ||
] |
{ | ||
"name": "core-js-compat", | ||
"description": "core-js compat", | ||
"version": "3.15.2", | ||
"version": "3.16.0", | ||
"repository": { | ||
@@ -20,3 +20,3 @@ "type": "git", | ||
"license": "MIT", | ||
"gitHead": "ea6ee013f5960f859d90e4136e91b035560ba72e" | ||
"gitHead": "89686ea7429ad46a05040269be44395e3760837d" | ||
} |
@@ -10,3 +10,3 @@ [`core-js-compat` package](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat) contains data about the necessity of [`core-js`](https://github.com/zloirock/core-js) modules and API for getting a list of required core-js modules by browserslist query. | ||
filter: /^(es|web)\./, // optional filter - string-prefix, regexp or list of modules | ||
version: '3.15', // used `core-js` version, by default - the latest | ||
version: '3.16', // used `core-js` version, by default - the latest | ||
}); | ||
@@ -45,4 +45,31 @@ | ||
Additional API: | ||
### `targets` option | ||
`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' | ||
// object: | ||
{ | ||
android: '4.0', // Android WebView version | ||
chrome: '38', // Chrome version | ||
deno: '1.12', // Deno version | ||
edge: '13', // Edge version | ||
electron: '5.0', // Electron framework version | ||
firefox: '15', // Firefox version | ||
ie: '8', // Internet Explorer version | ||
ios: '13.0', // iOS Safari version | ||
node: 'current', // NodeJS version, you could use 'current' for set it to currently used | ||
opera: '12', // Opera version | ||
opera_mobile: '7', // Opera Mobile version | ||
phantom: '1.9', // PhantomJS headless browser version | ||
rhino: '1.7.13', // Rhino engine version | ||
safari: '14.0', // Safari version | ||
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: | ||
```js | ||
@@ -70,7 +97,7 @@ // equals of of the method from the example above | ||
// the subset of modules which available in the passed `core-js` version: | ||
require('core-js-compat/get-modules-list-for-target-version')('3.15'); // => Array<ModuleName> | ||
require('core-js-compat/get-modules-list-for-target-version')('3.16'); // => Array<ModuleName> | ||
// or | ||
require('core-js-compat').getModulesListForTargetVersion('3.15'); // => Array<ModuleName> | ||
require('core-js-compat').getModulesListForTargetVersion('3.16'); // => Array<ModuleName> | ||
``` | ||
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). |
@@ -17,2 +17,3 @@ 'use strict'; | ||
'chrome', | ||
'deno', | ||
'edge', | ||
@@ -41,3 +42,7 @@ 'electron', | ||
if (browsers) { | ||
list.push(...browserslist(browsers).map(it => it.split(' '))); | ||
if (typeof browsers === 'string' || Array.isArray(browsers)) { | ||
list.push(...browserslist(browsers).map(it => it.split(' '))); | ||
} else { | ||
list.push(...Object.entries(browsers)); | ||
} | ||
} | ||
@@ -44,0 +49,0 @@ if (esmodules) { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
342400
13729
101
1