source: trip-planner-front/node_modules/babel-plugin-polyfill-corejs2/lib/built-in-definitions.js@ 76712b2

Last change on this file since 76712b2 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 11.7 KB
Line 
1"use strict";
2
3exports.__esModule = true;
4exports.StaticProperties = exports.InstanceProperties = exports.BuiltIns = exports.CommonIterators = void 0;
5
6var _corejs2BuiltIns = _interopRequireDefault(require("@babel/compat-data/corejs2-built-ins"));
7
8function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
10const define = (name, pure, global = [], meta) => {
11 return {
12 name,
13 pure,
14 global,
15 meta
16 };
17};
18
19const pureAndGlobal = (pure, global, minRuntimeVersion = null) => define(global[0], pure, global, {
20 minRuntimeVersion
21});
22
23const globalOnly = global => define(global[0], null, global);
24
25const pureOnly = (pure, name) => define(name, pure, []);
26
27const ArrayNatureIterators = ["es6.object.to-string", "es6.array.iterator", "web.dom.iterable"];
28const CommonIterators = ["es6.string.iterator", ...ArrayNatureIterators];
29exports.CommonIterators = CommonIterators;
30const PromiseDependencies = ["es6.object.to-string", "es6.promise"];
31const BuiltIns = {
32 DataView: globalOnly(["es6.typed.data-view"]),
33 Float32Array: globalOnly(["es6.typed.float32-array"]),
34 Float64Array: globalOnly(["es6.typed.float64-array"]),
35 Int8Array: globalOnly(["es6.typed.int8-array"]),
36 Int16Array: globalOnly(["es6.typed.int16-array"]),
37 Int32Array: globalOnly(["es6.typed.int32-array"]),
38 Map: pureAndGlobal("map", ["es6.map", ...CommonIterators]),
39 Number: globalOnly(["es6.number.constructor"]),
40 Promise: pureAndGlobal("promise", PromiseDependencies),
41 RegExp: globalOnly(["es6.regexp.constructor"]),
42 Set: pureAndGlobal("set", ["es6.set", ...CommonIterators]),
43 Symbol: pureAndGlobal("symbol", ["es6.symbol"]),
44 Uint8Array: globalOnly(["es6.typed.uint8-array"]),
45 Uint8ClampedArray: globalOnly(["es6.typed.uint8-clamped-array"]),
46 Uint16Array: globalOnly(["es6.typed.uint16-array"]),
47 Uint32Array: globalOnly(["es6.typed.uint32-array"]),
48 WeakMap: pureAndGlobal("weak-map", ["es6.weak-map", ...CommonIterators]),
49 WeakSet: pureAndGlobal("weak-set", ["es6.weak-set", ...CommonIterators]),
50 setImmediate: pureOnly("set-immediate", "web.immediate"),
51 clearImmediate: pureOnly("clear-immediate", "web.immediate"),
52 parseFloat: pureOnly("parse-float", "es6.parse-float"),
53 parseInt: pureOnly("parse-int", "es6.parse-int")
54};
55exports.BuiltIns = BuiltIns;
56const InstanceProperties = {
57 __defineGetter__: globalOnly(["es7.object.define-getter"]),
58 __defineSetter__: globalOnly(["es7.object.define-setter"]),
59 __lookupGetter__: globalOnly(["es7.object.lookup-getter"]),
60 __lookupSetter__: globalOnly(["es7.object.lookup-setter"]),
61 anchor: globalOnly(["es6.string.anchor"]),
62 big: globalOnly(["es6.string.big"]),
63 bind: globalOnly(["es6.function.bind"]),
64 blink: globalOnly(["es6.string.blink"]),
65 bold: globalOnly(["es6.string.bold"]),
66 codePointAt: globalOnly(["es6.string.code-point-at"]),
67 copyWithin: globalOnly(["es6.array.copy-within"]),
68 endsWith: globalOnly(["es6.string.ends-with"]),
69 entries: globalOnly(ArrayNatureIterators),
70 every: globalOnly(["es6.array.every"]),
71 fill: globalOnly(["es6.array.fill"]),
72 filter: globalOnly(["es6.array.filter"]),
73 finally: globalOnly(["es7.promise.finally", ...PromiseDependencies]),
74 find: globalOnly(["es6.array.find"]),
75 findIndex: globalOnly(["es6.array.find-index"]),
76 fixed: globalOnly(["es6.string.fixed"]),
77 flags: globalOnly(["es6.regexp.flags"]),
78 flatMap: globalOnly(["es7.array.flat-map"]),
79 fontcolor: globalOnly(["es6.string.fontcolor"]),
80 fontsize: globalOnly(["es6.string.fontsize"]),
81 forEach: globalOnly(["es6.array.for-each"]),
82 includes: globalOnly(["es6.string.includes", "es7.array.includes"]),
83 indexOf: globalOnly(["es6.array.index-of"]),
84 italics: globalOnly(["es6.string.italics"]),
85 keys: globalOnly(ArrayNatureIterators),
86 lastIndexOf: globalOnly(["es6.array.last-index-of"]),
87 link: globalOnly(["es6.string.link"]),
88 map: globalOnly(["es6.array.map"]),
89 match: globalOnly(["es6.regexp.match"]),
90 name: globalOnly(["es6.function.name"]),
91 padStart: globalOnly(["es7.string.pad-start"]),
92 padEnd: globalOnly(["es7.string.pad-end"]),
93 reduce: globalOnly(["es6.array.reduce"]),
94 reduceRight: globalOnly(["es6.array.reduce-right"]),
95 repeat: globalOnly(["es6.string.repeat"]),
96 replace: globalOnly(["es6.regexp.replace"]),
97 search: globalOnly(["es6.regexp.search"]),
98 small: globalOnly(["es6.string.small"]),
99 some: globalOnly(["es6.array.some"]),
100 sort: globalOnly(["es6.array.sort"]),
101 split: globalOnly(["es6.regexp.split"]),
102 startsWith: globalOnly(["es6.string.starts-with"]),
103 strike: globalOnly(["es6.string.strike"]),
104 sub: globalOnly(["es6.string.sub"]),
105 sup: globalOnly(["es6.string.sup"]),
106 toISOString: globalOnly(["es6.date.to-iso-string"]),
107 toJSON: globalOnly(["es6.date.to-json"]),
108 toString: globalOnly(["es6.object.to-string", "es6.date.to-string", "es6.regexp.to-string"]),
109 trim: globalOnly(["es6.string.trim"]),
110 trimEnd: globalOnly(["es7.string.trim-right"]),
111 trimLeft: globalOnly(["es7.string.trim-left"]),
112 trimRight: globalOnly(["es7.string.trim-right"]),
113 trimStart: globalOnly(["es7.string.trim-left"]),
114 values: globalOnly(ArrayNatureIterators)
115}; // This isn't present in older @babel/compat-data versions
116
117exports.InstanceProperties = InstanceProperties;
118
119if ("es6.array.slice" in _corejs2BuiltIns.default) {
120 InstanceProperties.slice = globalOnly(["es6.array.slice"]);
121}
122
123const StaticProperties = {
124 Array: {
125 from: pureAndGlobal("array/from", ["es6.symbol", "es6.array.from", ...CommonIterators]),
126 isArray: pureAndGlobal("array/is-array", ["es6.array.is-array"]),
127 of: pureAndGlobal("array/of", ["es6.array.of"])
128 },
129 Date: {
130 now: pureAndGlobal("date/now", ["es6.date.now"])
131 },
132 JSON: {
133 stringify: pureOnly("json/stringify", "es6.symbol")
134 },
135 Math: {
136 // 'Math' was not included in the 7.0.0
137 // release of '@babel/runtime'. See issue https://github.com/babel/babel/pull/8616.
138 acosh: pureAndGlobal("math/acosh", ["es6.math.acosh"], "7.0.1"),
139 asinh: pureAndGlobal("math/asinh", ["es6.math.asinh"], "7.0.1"),
140 atanh: pureAndGlobal("math/atanh", ["es6.math.atanh"], "7.0.1"),
141 cbrt: pureAndGlobal("math/cbrt", ["es6.math.cbrt"], "7.0.1"),
142 clz32: pureAndGlobal("math/clz32", ["es6.math.clz32"], "7.0.1"),
143 cosh: pureAndGlobal("math/cosh", ["es6.math.cosh"], "7.0.1"),
144 expm1: pureAndGlobal("math/expm1", ["es6.math.expm1"], "7.0.1"),
145 fround: pureAndGlobal("math/fround", ["es6.math.fround"], "7.0.1"),
146 hypot: pureAndGlobal("math/hypot", ["es6.math.hypot"], "7.0.1"),
147 imul: pureAndGlobal("math/imul", ["es6.math.imul"], "7.0.1"),
148 log1p: pureAndGlobal("math/log1p", ["es6.math.log1p"], "7.0.1"),
149 log10: pureAndGlobal("math/log10", ["es6.math.log10"], "7.0.1"),
150 log2: pureAndGlobal("math/log2", ["es6.math.log2"], "7.0.1"),
151 sign: pureAndGlobal("math/sign", ["es6.math.sign"], "7.0.1"),
152 sinh: pureAndGlobal("math/sinh", ["es6.math.sinh"], "7.0.1"),
153 tanh: pureAndGlobal("math/tanh", ["es6.math.tanh"], "7.0.1"),
154 trunc: pureAndGlobal("math/trunc", ["es6.math.trunc"], "7.0.1")
155 },
156 Number: {
157 EPSILON: pureAndGlobal("number/epsilon", ["es6.number.epsilon"]),
158 MIN_SAFE_INTEGER: pureAndGlobal("number/min-safe-integer", ["es6.number.min-safe-integer"]),
159 MAX_SAFE_INTEGER: pureAndGlobal("number/max-safe-integer", ["es6.number.max-safe-integer"]),
160 isFinite: pureAndGlobal("number/is-finite", ["es6.number.is-finite"]),
161 isInteger: pureAndGlobal("number/is-integer", ["es6.number.is-integer"]),
162 isSafeInteger: pureAndGlobal("number/is-safe-integer", ["es6.number.is-safe-integer"]),
163 isNaN: pureAndGlobal("number/is-nan", ["es6.number.is-nan"]),
164 parseFloat: pureAndGlobal("number/parse-float", ["es6.number.parse-float"]),
165 parseInt: pureAndGlobal("number/parse-int", ["es6.number.parse-int"])
166 },
167 Object: {
168 assign: pureAndGlobal("object/assign", ["es6.object.assign"]),
169 create: pureAndGlobal("object/create", ["es6.object.create"]),
170 defineProperties: pureAndGlobal("object/define-properties", ["es6.object.define-properties"]),
171 defineProperty: pureAndGlobal("object/define-property", ["es6.object.define-property"]),
172 entries: pureAndGlobal("object/entries", ["es7.object.entries"]),
173 freeze: pureAndGlobal("object/freeze", ["es6.object.freeze"]),
174 getOwnPropertyDescriptor: pureAndGlobal("object/get-own-property-descriptor", ["es6.object.get-own-property-descriptor"]),
175 getOwnPropertyDescriptors: pureAndGlobal("object/get-own-property-descriptors", ["es7.object.get-own-property-descriptors"]),
176 getOwnPropertyNames: pureAndGlobal("object/get-own-property-names", ["es6.object.get-own-property-names"]),
177 getOwnPropertySymbols: pureAndGlobal("object/get-own-property-symbols", ["es6.symbol"]),
178 getPrototypeOf: pureAndGlobal("object/get-prototype-of", ["es6.object.get-prototype-of"]),
179 is: pureAndGlobal("object/is", ["es6.object.is"]),
180 isExtensible: pureAndGlobal("object/is-extensible", ["es6.object.is-extensible"]),
181 isFrozen: pureAndGlobal("object/is-frozen", ["es6.object.is-frozen"]),
182 isSealed: pureAndGlobal("object/is-sealed", ["es6.object.is-sealed"]),
183 keys: pureAndGlobal("object/keys", ["es6.object.keys"]),
184 preventExtensions: pureAndGlobal("object/prevent-extensions", ["es6.object.prevent-extensions"]),
185 seal: pureAndGlobal("object/seal", ["es6.object.seal"]),
186 setPrototypeOf: pureAndGlobal("object/set-prototype-of", ["es6.object.set-prototype-of"]),
187 values: pureAndGlobal("object/values", ["es7.object.values"])
188 },
189 Promise: {
190 all: globalOnly(CommonIterators),
191 race: globalOnly(CommonIterators)
192 },
193 Reflect: {
194 apply: pureAndGlobal("reflect/apply", ["es6.reflect.apply"]),
195 construct: pureAndGlobal("reflect/construct", ["es6.reflect.construct"]),
196 defineProperty: pureAndGlobal("reflect/define-property", ["es6.reflect.define-property"]),
197 deleteProperty: pureAndGlobal("reflect/delete-property", ["es6.reflect.delete-property"]),
198 get: pureAndGlobal("reflect/get", ["es6.reflect.get"]),
199 getOwnPropertyDescriptor: pureAndGlobal("reflect/get-own-property-descriptor", ["es6.reflect.get-own-property-descriptor"]),
200 getPrototypeOf: pureAndGlobal("reflect/get-prototype-of", ["es6.reflect.get-prototype-of"]),
201 has: pureAndGlobal("reflect/has", ["es6.reflect.has"]),
202 isExtensible: pureAndGlobal("reflect/is-extensible", ["es6.reflect.is-extensible"]),
203 ownKeys: pureAndGlobal("reflect/own-keys", ["es6.reflect.own-keys"]),
204 preventExtensions: pureAndGlobal("reflect/prevent-extensions", ["es6.reflect.prevent-extensions"]),
205 set: pureAndGlobal("reflect/set", ["es6.reflect.set"]),
206 setPrototypeOf: pureAndGlobal("reflect/set-prototype-of", ["es6.reflect.set-prototype-of"])
207 },
208 String: {
209 at: pureOnly("string/at", "es7.string.at"),
210 fromCodePoint: pureAndGlobal("string/from-code-point", ["es6.string.from-code-point"]),
211 raw: pureAndGlobal("string/raw", ["es6.string.raw"])
212 },
213 Symbol: {
214 // FIXME: Pure disabled to work around zloirock/core-js#262.
215 asyncIterator: globalOnly(["es6.symbol", "es7.symbol.async-iterator"]),
216 for: pureOnly("symbol/for", "es6.symbol"),
217 hasInstance: pureOnly("symbol/has-instance", "es6.symbol"),
218 isConcatSpreadable: pureOnly("symbol/is-concat-spreadable", "es6.symbol"),
219 iterator: define("es6.symbol", "symbol/iterator", CommonIterators),
220 keyFor: pureOnly("symbol/key-for", "es6.symbol"),
221 match: pureAndGlobal("symbol/match", ["es6.regexp.match"]),
222 replace: pureOnly("symbol/replace", "es6.symbol"),
223 search: pureOnly("symbol/search", "es6.symbol"),
224 species: pureOnly("symbol/species", "es6.symbol"),
225 split: pureOnly("symbol/split", "es6.symbol"),
226 toPrimitive: pureOnly("symbol/to-primitive", "es6.symbol"),
227 toStringTag: pureOnly("symbol/to-string-tag", "es6.symbol"),
228 unscopables: pureOnly("symbol/unscopables", "es6.symbol")
229 }
230};
231exports.StaticProperties = StaticProperties;
Note: See TracBrowser for help on using the repository browser.