GoScrobble/web/node_modules/babel-plugin-polyfill-corejs3/esm/index.mjs.map

1 line
65 KiB
Plaintext
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
{"version":3,"file":"index.mjs","sources":["../src/shipped-proposals.js","../src/built-in-definitions.js","../src/utils.js","../src/index.js"],"sourcesContent":["// @flow\n\nexport default new Set<string>([\n \"esnext.global-this\",\n \"esnext.string.match-all\",\n]);\n","// @flow\n\nimport corejs3Polyfills from \"../core-js-compat/data.js\";\n\ntype ObjectMap<V> = { [name: string]: V };\n\nexport type CoreJSPolyfillDescriptor = {\n name: string,\n pure: ?string,\n global: string[],\n exclude: ?(string[]),\n};\n\nconst polyfillsOrder = {};\nObject.keys(corejs3Polyfills).forEach((name, index) => {\n polyfillsOrder[name] = index;\n});\n\nconst define = (\n pure,\n global,\n name = global[0],\n exclude,\n): CoreJSPolyfillDescriptor => {\n return {\n name,\n pure,\n global: global.sort((a, b) => polyfillsOrder[a] - polyfillsOrder[b]),\n exclude,\n };\n};\n\nconst typed = (name: string) => define(null, [name, ...TypedArrayDependencies]);\n\nconst ArrayNatureIterators = [\n \"es.array.iterator\",\n \"web.dom-collections.iterator\",\n];\n\nexport const CommonIterators = [\"es.string.iterator\", ...ArrayNatureIterators];\n\nconst ArrayNatureIteratorsWithTag = [\n \"es.object.to-string\",\n ...ArrayNatureIterators,\n];\n\nconst CommonIteratorsWithTag = [\"es.object.to-string\", ...CommonIterators];\n\nconst TypedArrayDependencies = [\n \"es.typed-array.copy-within\",\n \"es.typed-array.every\",\n \"es.typed-array.fill\",\n \"es.typed-array.filter\",\n \"es.typed-array.find\",\n \"es.typed-array.find-index\",\n \"es.typed-array.for-each\",\n \"es.typed-array.includes\",\n \"es.typed-array.index-of\",\n \"es.typed-array.iterator\",\n \"es.typed-array.join\",\n \"es.typed-array.last-index-of\",\n \"es.typed-array.map\",\n \"es.typed-array.reduce\",\n \"es.typed-array.reduce-right\",\n \"es.typed-array.reverse\",\n \"es.typed-array.set\",\n \"es.typed-array.slice\",\n \"es.typed-array.some\",\n \"es.typed-array.sort\",\n \"es.typed-array.subarray\",\n \"es.typed-array.to-locale-string\",\n \"es.typed-array.to-string\",\n \"es.object.to-string\",\n \"es.array.iterator\",\n \"es.array-buffer.slice\",\n];\n\nconst TypedArrayStaticMethods = {\n from: define(null, [\"es.typed-array.from\"]),\n of: define(null, [\"es.typed-array.of\"]),\n};\n\nexport const PromiseDependencies = [\"es.promise\", \"es.object.to-string\"];\n\nexport const PromiseDependenciesWithIterators = [\n ...PromiseDependencies,\n ...CommonIterators,\n];\n\nconst SymbolDependencies = [\n \"es.symbol\",\n \"es.symbol.description\",\n \"es.object.to-string\",\n];\n\nconst MapDependencies = [\n \"es.map\",\n \"esnext.map.delete-all\",\n \"esnext.map.every\",\n \"esnext.map.filter\",\n \"esnext.map.find\",\n \"esnext.map.find-key\",\n \"esnext.map.includes\",\n \"esnext.map.key-of\",\n \"esnext.map.map-keys\",\n \"esnext.map.map-values\",\n \"esnext.map.merge\",\n \"esnext.map.reduce\",\n \"esnext.map.some\",\n \"esnext.map.update\",\n ...CommonIteratorsWithTag,\n];\n\nconst SetDependencies = [\n \"es.set\",\n \"esnext.set.add-all\",\n \"esnext.set.delete-all\",\n \"esnext.set.difference\",\n \"esnext.set.every\",\n \"esnext.set.filter\",\n \"esnext.set.find\",\n \"esnext.set.intersection\",\n \"esnext.set.is-disjoint-from\",\n \"esnext.set.is-subset-of\",\n \"esnext.set.is-superset-of\",\n \"esnext.set.join\",\n \"esnext.set.map\",\n \"esnext.set.reduce\",\n \"esnext.set.some\",\n \"esnext.set.symmetric-difference\",\n \"esnext.set.union\",\n ...CommonIteratorsWithTag,\n];\n\nconst WeakMapDependencies = [\n \"es.weak-map\",\n \"esnext.weak-map.delete-all\",\n ...CommonIteratorsWithTag,\n];\n\nconst WeakSetDependencies = [\n \"es.weak-set\",\n \"esnext.weak-set.add-all\",\n \"esnext.weak-set.delete-all\",\n ...CommonIteratorsWithTag,\n];\n\nconst URLSearchParamsDependencies = [\"web.url\", ...CommonIteratorsWithTag];\n\nexport const BuiltIns: ObjectMap<CoreJSPolyfillDescriptor> = {\n AggregateError: define(\"aggregate-error\", [\n \"esnext.aggregate-error\",\n ...Com