{"name":"core-js-compat","version":"3.43.0","author":{"url":"http://zloirock.ru","name":"Denis Pushkarev","email":"zloirock@zloirock.ru"},"license":"MIT","_id":"core-js-compat@3.43.0","maintainers":[{"name":"zloirock","email":"zloirock@zloirock.ru"}],"homepage":"https://github.com/zloirock/core-js#readme","bugs":{"url":"https://github.com/zloirock/core-js/issues"},"dist":{"shasum":"055587369c458795ef316f65e0aabb808fb15840","tarball":"http://registry-npm.ywwl.com/core-js-compat/download/core-js-compat-3.43.0.tgz","fileCount":17,"integrity":"sha512-2GML2ZsCc5LR7hZYz4AXmjQw8zuy2T//2QntwdnpuYI7jteT6GVYJL7F6C2C57R7gSYrcqVW3lAALefdbhBLDA==","signatures":[{"sig":"MEUCICTQC6c/JirFd4Ol5TINF6Wa1qSl14ZolOwZp+YSIDwnAiEA3+7dAjpVE748qsaCsmns9X70lh3uuDCADSgmTkqROaY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":791287,"size":67062,"noattachment":false,"key":"/core-js-compat/-/core-js-compat-3.43.0.tgz"},"main":"index.js","type":"commonjs","types":"index.d.ts","funding":{"url":"https://opencollective.com/core-js","type":"opencollective"},"gitHead":"f4f46336b3f2b9ac7a688f9a6d2fa6f12f94ebab","_npmUser":{"name":"zloirock","email":"zloirock@zloirock.ru"},"repository":{"url":"git+https://github.com/zloirock/core-js.git","type":"git","directory":"packages/core-js-compat"},"_npmVersion":"11.4.1","description":"core-js compat","directories":{},"sideEffects":false,"_nodeVersion":"24.1.0","dependencies":{"browserslist":"^4.25.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/core-js-compat_3.43.0_1749452102111_0.84276552583638","host":"s3://npm-registry-packages-npm-production"},"readme":"![logo](https://user-images.githubusercontent.com/2213682/146607186-8e13ddef-26a4-4ebf-befd-5aac9d77c090.png)\n\n<div align=\"center\">\n\n[![fundraising](https://opencollective.com/core-js/all/badge.svg?label=fundraising)](https://opencollective.com/core-js) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md) [![version](https://img.shields.io/npm/v/core-js-compat.svg)](https://www.npmjs.com/package/core-js-compat) [![core-js-compat downloads](https://img.shields.io/npm/dm/core-js-compat.svg?label=npm%20i%20core-js-compat)](https://npm-stat.com/charts.html?package=core-js&package=core-js-pure&package=core-js-compat&from=2014-11-18)\n\n</div>\n\n**I highly recommend reading this: [So, what's next?](https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md)**\n---\n\n[`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://core-js.io) modules and API for getting a list of required core-js modules by browserslist query.\n\n```js\nimport compat from 'core-js-compat';\n\nconst {\n  list,                       // array of required modules\n  targets,                    // object with targets for each module\n} = compat({\n  targets: '> 1%',            // browserslist query or object of minimum environment versions to support, see below\n  modules: [                  // optional list / filter of modules - regex, string or an array of them:\n    'core-js/actual',         // - an entry point\n    'esnext.array.unique-by', // - a module name (or just a start of a module name)\n    /^web\\./,                 // - regex that a module name must satisfy\n  ],\n  exclude: [                  // optional list / filter of modules to exclude, the signature is similar to `modules` option\n    'web.atob',\n  ],\n  version: '3.50',            // used `core-js` version, by default - the latest\n  inverse: false,             // inverse of the result - shows modules that are NOT required for the target environment\n});\n\nconsole.log(targets);\n/* =>\n{\n  'es.error.cause': { ios: '14.5-14.8' },\n  'es.aggregate-error.cause': { ios: '14.5-14.8' },\n  'es.array.at': { ios: '14.5-14.8' },\n  'es.array.find-last': { firefox: '100', ios: '14.5-14.8' },\n  'es.array.find-last-index': { firefox: '100', ios: '14.5-14.8' },\n  'es.array.includes': { firefox: '100' },\n  'es.array.push': { chrome: '100', edge: '101', ios: '14.5-14.8', safari: '15.4' },\n  'es.array.unshift': { ios: '14.5-14.8', safari: '15.4' },\n  'es.object.has-own': { ios: '14.5-14.8' },\n  'es.regexp.flags': { chrome: '100', edge: '101' },\n  'es.string.at-alternative': { ios: '14.5-14.8' },\n  'es.typed-array.at': { ios: '14.5-14.8' },\n  'es.typed-array.find-last': { firefox: '100', ios: '14.5-14.8' },\n  'es.typed-array.find-last-index': { firefox: '100', ios: '14.5-14.8' },\n  'esnext.array.group': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.group-by': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.group-by-to-map': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.group-to-map': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.to-reversed': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.to-sorted': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.to-spliced': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.unique-by': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.array.with': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.typed-array.to-reversed': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.typed-array.to-sorted': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.typed-array.to-spliced': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'esnext.typed-array.with': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'web.dom-exception.stack': { chrome: '100', edge: '101', ios: '14.5-14.8', safari: '15.4' },\n  'web.immediate': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' },\n  'web.structured-clone': { chrome: '100', edge: '101', firefox: '100', ios: '14.5-14.8', safari: '15.4' }\n}\n*/\n```\n\n### `targets` option\n`targets` could be [a `browserslist` query](https://github.com/browserslist/browserslist) or a targets object that specifies minimum environment versions to support:\n```js\n// browserslist query:\n'defaults, not IE 11, maintained node versions';\n// object (sure, all those fields optional):\n({\n  android: '4.0',         // Android WebView version\n  bun: '0.1.2',           // Bun version\n  chrome: '38',           // Chrome version\n  'chrome-android': '18', // Chrome for Android version\n  deno: '1.12',           // Deno version\n  edge: '13',             // Edge version\n  electron: '5.0',        // Electron framework version\n  firefox: '15',          // Firefox version\n  'firefox-android': '4', // Firefox for Android version\n  hermes: '0.11',         // Hermes version\n  ie: '8',                // Internet Explorer version\n  ios: '13.0',            // iOS Safari version\n  node: 'current',        // NodeJS version, you can use 'current' for set it to currently used\n  opera: '12',            // Opera version\n  'opera-android': '7',   // Opera for Android version\n  phantom: '1.9',         // PhantomJS headless browser version\n  quest: '5.0',           // Meta Quest Browser version\n  'react-native': '0.70', // React Native version (default Hermes engine)\n  rhino: '1.7.13',        // Rhino engine version\n  safari: '14.0',         // Safari version\n  samsung: '14.0',        // Samsung Internet version\n  /**\n   * true option set target to minimum supporting ES Modules versions of all browsers, ignoring `browsers` target.\n   * 'intersect' option intersects the `browsers` target and `browserslist`'s targets. The maximum version will be used.\n   */\n  esmodules: true | 'intersect',\n  browsers: '> 0.25%',    // Browserslist query or object with target browsers\n});\n```\n\n### Additional API:\n\n```js\n// equals of of the method from the example above\nrequire('core-js-compat/compat')({ targets, modules, version }); // => { list: Array<ModuleName>, targets: { [ModuleName]: { [EngineName]: EngineVersion } } }\n// or\nrequire('core-js-compat').compat({ targets, modules, version }); // => { list: Array<ModuleName>, targets: { [ModuleName]: { [EngineName]: EngineVersion } } }\n\n// full compat data:\nrequire('core-js-compat/data'); // => { [ModuleName]: { [EngineName]: EngineVersion } }\n// or\nrequire('core-js-compat').data; // => { [ModuleName]: { [EngineName]: EngineVersion } }\n\n// map of modules by `core-js` entry points:\nrequire('core-js-compat/entries'); // => { [EntryPoint]: Array<ModuleName> }\n// or\nrequire('core-js-compat').entries; // => { [EntryPoint]: Array<ModuleName> }\n\n// full list of modules:\nrequire('core-js-compat/modules'); // => Array<ModuleName>\n// or\nrequire('core-js-compat').modules; // => Array<ModuleName>\n\n// the subset of modules which available in the passed `core-js` version:\nrequire('core-js-compat/get-modules-list-for-target-version')('3.50'); // => Array<ModuleName>\n// or\nrequire('core-js-compat').getModulesListForTargetVersion('3.50'); // => Array<ModuleName>\n```\n\nIf 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/master/compat/), the example:\n\n![compat-table](https://user-images.githubusercontent.com/2213682/217452234-ccdcfc5a-c7d3-40d1-ab3f-86902315b8c3.png)\n","publish_time":1749452102276,"_cnpm_publish_time":1749452102276,"dist-tags":{"beta":"3.0.0-beta.20","latest":"3.51.0"}}