|
20 | 20 |
|
21 | 21 | // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 |
22 | 22 | var global_1 = |
23 | | - // eslint-disable-next-line es/no-global-this -- safe |
| 23 | + // eslint-disable-next-line es-x/no-global-this -- safe |
24 | 24 | check(typeof globalThis == 'object' && globalThis) || |
25 | 25 | check(typeof window == 'object' && window) || |
26 | 26 | // eslint-disable-next-line no-restricted-globals -- safe |
|
39 | 39 |
|
40 | 40 | // Detect IE8's incomplete defineProperty implementation |
41 | 41 | var descriptors = !fails(function () { |
42 | | - // eslint-disable-next-line es/no-object-defineproperty -- required for testing |
| 42 | + // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing |
43 | 43 | return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; |
44 | 44 | }); |
45 | 45 |
|
46 | 46 | var functionBindNative = !fails(function () { |
| 47 | + // eslint-disable-next-line es-x/no-function-prototype-bind -- safe |
47 | 48 | var test = (function () { /* empty */ }).bind(); |
48 | 49 | // eslint-disable-next-line no-prototype-builtins -- safe |
49 | 50 | return typeof test != 'function' || test.hasOwnProperty('prototype'); |
|
56 | 57 | }; |
57 | 58 |
|
58 | 59 | var $propertyIsEnumerable = {}.propertyIsEnumerable; |
59 | | - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe |
| 60 | + // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe |
60 | 61 | var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; |
61 | 62 |
|
62 | 63 | // Nashorn ~ JDK8 bug |
|
178 | 179 |
|
179 | 180 | var engineV8Version = version; |
180 | 181 |
|
181 | | - /* eslint-disable es/no-symbol -- required for testing */ |
| 182 | + /* eslint-disable es-x/no-symbol -- required for testing */ |
182 | 183 |
|
183 | 184 |
|
184 | 185 |
|
185 | | - // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing |
| 186 | + // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing |
186 | 187 | var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () { |
187 | 188 | var symbol = Symbol(); |
188 | 189 | // Chrome 38 Symbol has incorrect toString conversion |
|
192 | 193 | !Symbol.sham && engineV8Version && engineV8Version < 41; |
193 | 194 | }); |
194 | 195 |
|
195 | | - /* eslint-disable es/no-symbol -- required for testing */ |
| 196 | + /* eslint-disable es-x/no-symbol -- required for testing */ |
196 | 197 |
|
197 | 198 |
|
198 | 199 | var useSymbolAsUid = nativeSymbol |
|
245 | 246 | throw TypeError$5("Can't convert object to primitive value"); |
246 | 247 | }; |
247 | 248 |
|
248 | | - // eslint-disable-next-line es/no-object-defineproperty -- safe |
| 249 | + // eslint-disable-next-line es-x/no-object-defineproperty -- safe |
249 | 250 | var defineProperty = Object.defineProperty; |
250 | 251 |
|
251 | 252 | var setGlobal = function (key, value) { |
|
265 | 266 | (module.exports = function (key, value) { |
266 | 267 | return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {}); |
267 | 268 | })('versions', []).push({ |
268 | | - version: '3.21.1', |
| 269 | + version: '3.22.4', |
269 | 270 | mode: 'global', |
270 | 271 | copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', |
271 | | - license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE', |
| 272 | + license: 'https://github.com/zloirock/core-js/blob/v3.22.4/LICENSE', |
272 | 273 | source: 'https://github.com/zloirock/core-js' |
273 | 274 | }); |
274 | 275 | }); |
|
285 | 286 |
|
286 | 287 | // `HasOwnProperty` abstract operation |
287 | 288 | // https://tc39.es/ecma262/#sec-hasownproperty |
| 289 | + // eslint-disable-next-line es-x/no-object-hasown -- safe |
288 | 290 | var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) { |
289 | 291 | return hasOwnProperty(toObject(it), key); |
290 | 292 | }; |
|
351 | 353 |
|
352 | 354 | // Thanks to IE8 for its funny defineProperty |
353 | 355 | var ie8DomDefine = !descriptors && !fails(function () { |
354 | | - // eslint-disable-next-line es/no-object-defineproperty -- required for testing |
| 356 | + // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing |
355 | 357 | return Object.defineProperty(documentCreateElement('div'), 'a', { |
356 | 358 | get: function () { return 7; } |
357 | 359 | }).a != 7; |
358 | 360 | }); |
359 | 361 |
|
360 | | - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe |
| 362 | + // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe |
361 | 363 | var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; |
362 | 364 |
|
363 | 365 | // `Object.getOwnPropertyDescriptor` method |
|
378 | 380 | // V8 ~ Chrome 36- |
379 | 381 | // https://bugs.chromium.org/p/v8/issues/detail?id=3334 |
380 | 382 | var v8PrototypeDefineBug = descriptors && fails(function () { |
381 | | - // eslint-disable-next-line es/no-object-defineproperty -- required for testing |
| 383 | + // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing |
382 | 384 | return Object.defineProperty(function () { /* empty */ }, 'prototype', { |
383 | 385 | value: 42, |
384 | 386 | writable: false |
|
395 | 397 | }; |
396 | 398 |
|
397 | 399 | var TypeError$2 = global_1.TypeError; |
398 | | - // eslint-disable-next-line es/no-object-defineproperty -- safe |
| 400 | + // eslint-disable-next-line es-x/no-object-defineproperty -- safe |
399 | 401 | var $defineProperty = Object.defineProperty; |
400 | | - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe |
| 402 | + // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe |
401 | 403 | var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; |
402 | 404 | var ENUMERABLE = 'enumerable'; |
403 | 405 | var CONFIGURABLE$1 = 'configurable'; |
|
443 | 445 | return object; |
444 | 446 | }; |
445 | 447 |
|
| 448 | + var FunctionPrototype = Function.prototype; |
| 449 | + // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe |
| 450 | + var getDescriptor = descriptors && Object.getOwnPropertyDescriptor; |
| 451 | + |
| 452 | + var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name'); |
| 453 | + // additional protection from minified / mangled / dropped function names |
| 454 | + var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; |
| 455 | + var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable)); |
| 456 | + |
| 457 | + var functionName = { |
| 458 | + EXISTS: EXISTS, |
| 459 | + PROPER: PROPER, |
| 460 | + CONFIGURABLE: CONFIGURABLE |
| 461 | + }; |
| 462 | + |
446 | 463 | var functionToString = functionUncurryThis(Function.toString); |
447 | 464 |
|
448 | 465 | // this helper broken in `[email protected]`, so we can't use `shared` helper |
|
526 | 543 | getterFor: getterFor |
527 | 544 | }; |
528 | 545 |
|
529 | | - var FunctionPrototype = Function.prototype; |
530 | | - // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe |
531 | | - var getDescriptor = descriptors && Object.getOwnPropertyDescriptor; |
| 546 | + var makeBuiltIn_1 = createCommonjsModule(function (module) { |
| 547 | + var defineProperty = objectDefineProperty.f; |
| 548 | + var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; |
532 | 549 |
|
533 | | - var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name'); |
534 | | - // additional protection from minified / mangled / dropped function names |
535 | | - var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; |
536 | | - var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable)); |
537 | 550 |
|
538 | | - var functionName = { |
539 | | - EXISTS: EXISTS, |
540 | | - PROPER: PROPER, |
541 | | - CONFIGURABLE: CONFIGURABLE |
542 | | - }; |
543 | 551 |
|
544 | | - var redefine = createCommonjsModule(function (module) { |
545 | | - var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE; |
546 | | - |
547 | | - var getInternalState = internalState.get; |
548 | 552 | var enforceInternalState = internalState.enforce; |
| 553 | + var getInternalState = internalState.get; |
| 554 | + |
| 555 | + var CONFIGURABLE_LENGTH = !fails(function () { |
| 556 | + return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8; |
| 557 | + }); |
| 558 | + |
549 | 559 | var TEMPLATE = String(String).split('String'); |
550 | 560 |
|
551 | | - (module.exports = function (O, key, value, options) { |
| 561 | + var makeBuiltIn = module.exports = function (value, name, options) { |
| 562 | + if (String(name).slice(0, 7) === 'Symbol(') { |
| 563 | + name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; |
| 564 | + } |
| 565 | + if (options && options.getter) name = 'get ' + name; |
| 566 | + if (options && options.setter) name = 'set ' + name; |
| 567 | + if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { |
| 568 | + defineProperty(value, 'name', { value: name, configurable: true }); |
| 569 | + } |
| 570 | + if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) { |
| 571 | + defineProperty(value, 'length', { value: options.arity }); |
| 572 | + } |
| 573 | + var state = enforceInternalState(value); |
| 574 | + if (!hasOwnProperty_1(state, 'source')) { |
| 575 | + state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); |
| 576 | + } return value; |
| 577 | + }; |
| 578 | + |
| 579 | + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative |
| 580 | + // eslint-disable-next-line no-extend-native -- required |
| 581 | + Function.prototype.toString = makeBuiltIn(function toString() { |
| 582 | + return isCallable(this) && getInternalState(this).source || inspectSource(this); |
| 583 | + }, 'toString'); |
| 584 | + }); |
| 585 | + |
| 586 | + var defineBuiltIn = function (O, key, value, options) { |
552 | 587 | var unsafe = options ? !!options.unsafe : false; |
553 | 588 | var simple = options ? !!options.enumerable : false; |
554 | 589 | var noTargetGet = options ? !!options.noTargetGet : false; |
555 | 590 | var name = options && options.name !== undefined ? options.name : key; |
556 | | - var state; |
557 | | - if (isCallable(value)) { |
558 | | - if (String(name).slice(0, 7) === 'Symbol(') { |
559 | | - name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; |
560 | | - } |
561 | | - if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { |
562 | | - createNonEnumerableProperty(value, 'name', name); |
563 | | - } |
564 | | - state = enforceInternalState(value); |
565 | | - if (!state.source) { |
566 | | - state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); |
567 | | - } |
568 | | - } |
| 591 | + if (isCallable(value)) makeBuiltIn_1(value, name, options); |
569 | 592 | if (O === global_1) { |
570 | 593 | if (simple) O[key] = value; |
571 | 594 | else setGlobal(key, value); |
572 | | - return; |
| 595 | + return O; |
573 | 596 | } else if (!unsafe) { |
574 | 597 | delete O[key]; |
575 | 598 | } else if (!noTargetGet && O[key]) { |
576 | 599 | simple = true; |
577 | 600 | } |
578 | 601 | if (simple) O[key] = value; |
579 | 602 | else createNonEnumerableProperty(O, key, value); |
580 | | - // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative |
581 | | - })(Function.prototype, 'toString', function toString() { |
582 | | - return isCallable(this) && getInternalState(this).source || inspectSource(this); |
583 | | - }); |
584 | | - }); |
| 603 | + return O; |
| 604 | + }; |
585 | 605 |
|
586 | 606 | var ceil = Math.ceil; |
587 | 607 | var floor = Math.floor; |
|
681 | 701 |
|
682 | 702 | // `Object.getOwnPropertyNames` method |
683 | 703 | // https://tc39.es/ecma262/#sec-object.getownpropertynames |
684 | | - // eslint-disable-next-line es/no-object-getownpropertynames -- safe |
| 704 | + // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe |
685 | 705 | var f$1 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { |
686 | 706 | return objectKeysInternal(O, hiddenKeys); |
687 | 707 | }; |
|
690 | 710 | f: f$1 |
691 | 711 | }; |
692 | 712 |
|
693 | | - // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe |
| 713 | + // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe |
694 | 714 | var f = Object.getOwnPropertySymbols; |
695 | 715 |
|
696 | 716 | var objectGetOwnPropertySymbols = { |
|
788 | 808 | if (options.sham || (targetProperty && targetProperty.sham)) { |
789 | 809 | createNonEnumerableProperty(sourceProperty, 'sham', true); |
790 | 810 | } |
791 | | - // extend global |
792 | | - redefine(target, key, sourceProperty, options); |
| 811 | + defineBuiltIn(target, key, sourceProperty, options); |
793 | 812 | } |
794 | 813 | }; |
795 | 814 |
|
796 | 815 | // `IsArray` abstract operation |
797 | 816 | // https://tc39.es/ecma262/#sec-isarray |
798 | | - // eslint-disable-next-line es/no-array-isarray -- safe |
| 817 | + // eslint-disable-next-line es-x/no-array-isarray -- safe |
799 | 818 | var isArray = Array.isArray || function isArray(argument) { |
800 | 819 | return classofRaw(argument) == 'Array'; |
801 | 820 | }; |
|
951 | 970 | // `Array.prototype.concat` method |
952 | 971 | // https://tc39.es/ecma262/#sec-array.prototype.concat |
953 | 972 | // with adding support of @@isConcatSpreadable and @@species |
954 | | - _export({ target: 'Array', proto: true, forced: FORCED }, { |
| 973 | + _export({ target: 'Array', proto: true, arity: 1, forced: FORCED }, { |
955 | 974 | // eslint-disable-next-line no-unused-vars -- required for `.length` |
956 | 975 | concat: function concat(arg) { |
957 | 976 | var O = toObject(this); |
|
0 commit comments