![]() | Name | Last modified | Size | Description |
---|---|---|---|---|
![]() | Parent Directory | - | ||
![]() | node_modules/ | 2 years ago | - | |
![]() | LICENSE | 2 years ago | 1.0K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | README.md | 2 years ago | 3.4K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | compat.js | 2 years ago | 1.4K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | data.json | 2 years ago | 55K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | entries.json | 2 years ago | 210K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | external.json | 2 years ago | 188 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | get-modules-list-for-target-version.js | 2 years ago | 584 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | helpers.js | 2 years ago | 636 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | index.js | 2 years ago | 367 | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | modules-by-versions.json | 2 years ago | 9.2K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | modules.json | 2 years ago | 8.5K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | package.json | 2 years ago | 1.4K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
![]() | targets-parser.js | 2 years ago | 1.7K | 0fb859dc fixed mobile overflwo options [كارل مبارك] |
core-js-compat
package contains data about the necessity of core-js
modules and API for getting a list of required core-js modules by browserslist query.
const {
list, // array of required modules
targets, // object with targets for each module
} = require('core-js-compat')({
targets: '> 2.5%', // browserslist query or object of minimum environment versions to support
filter: /^(es|web)\./, // optional filter - string-prefix, regexp or list of modules
version: '3.4', // used `core-js` version, by default - the latest
});
console.log(targets);
/* =>
{
'es.symbol.match-all': { ios: '12.2-12.4' },
'es.array.unscopables.flat': { ios: '12.2-12.4' },
'es.array.unscopables.flat-map': { ios: '12.2-12.4' },
'es.math.hypot': { chrome: '77' },
'es.promise.all-settled': { firefox: '69', ios: '12.2-12.4' },
'es.promise.finally': { ios: '12.2-12.4' },
'es.string.match-all': { chrome: '77', firefox: '69', ios: '12.2-12.4' },
'es.string.replace': { firefox: '69', ios: '12.2-12.4' },
'es.typed-array.float32-array': { ios: '12.2-12.4' },
'es.typed-array.float64-array': { ios: '12.2-12.4' },
'es.typed-array.int8-array': { ios: '12.2-12.4' },
'es.typed-array.int16-array': { ios: '12.2-12.4' },
'es.typed-array.int32-array': { ios: '12.2-12.4' },
'es.typed-array.uint8-array': { ios: '12.2-12.4' },
'es.typed-array.uint8-clamped-array': { ios: '12.2-12.4' },
'es.typed-array.uint16-array': { ios: '12.2-12.4' },
'es.typed-array.uint32-array': { ios: '12.2-12.4' },
'es.typed-array.from': { ios: '12.2-12.4' },
'es.typed-array.of': { ios: '12.2-12.4' },
'web.dom-collections.iterator': { ios: '12.2-12.4' },
'web.immediate': { chrome: '77', firefox: '69', ios: '12.2-12.4' },
'web.url': { ios: '12.2-12.4' },
'web.url.to-json': { ios: '12.2-12.4' },
'web.url-search-params': { ios: '12.2-12.4' }
}
*/
Additional API:
// equals of of the method from the example above
require('core-js-compat/compat')({ targets, filter, version }); // => { list: Array<ModuleName>, targets: { [ModuleName]: { [EngineName]: EngineVersion } } }
// or
require('core-js-compat').compat({ targets, filter, version }); // => { list: Array<ModuleName>, targets: { [ModuleName]: { [EngineName]: EngineVersion } } }
// full compat data:
require('core-js-compat/data'); // => { [ModuleName]: { [EngineName]: EngineVersion } }
// or
require('core-js-compat').data; // => { [ModuleName]: { [EngineName]: EngineVersion } }
// map of modules by `core-js` entry points:
require('core-js-compat/entries'); // => { [EntryPoint]: Array<ModuleName> }
// or
require('core-js-compat').entries; // => { [EntryPoint]: Array<ModuleName> }
// full list of modules:
require('core-js-compat/modules'); // => Array<ModuleName>
// or
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.3'); // => Array<ModuleName>
// or
require('core-js-compat').getModulesListForTargetVersion('3.3'); // => Array<ModuleName>
If you want to add new / update data about modules required for target engines, follow this instruction.