core-js 3.9.1 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/es/index.js +96 -97
  2. package/es/json/index.js +1 -0
  3. package/es/json/stringify.js +1 -0
  4. package/features/index.js +353 -2
  5. package/index.js +1 -6
  6. package/internals/array-buffer-native.js +1 -0
  7. package/internals/array-buffer.js +3 -3
  8. package/internals/array-copy-within.js +1 -0
  9. package/internals/array-for-each.js +1 -0
  10. package/internals/array-last-index-of.js +5 -4
  11. package/internals/check-correctness-of-iteration.js +1 -1
  12. package/internals/correct-prototype-getter.js +1 -0
  13. package/internals/descriptors.js +1 -0
  14. package/internals/fix-regexp-well-known-symbol-logic.js +1 -0
  15. package/internals/freezing.js +1 -0
  16. package/internals/get-map-iterator.js +1 -1
  17. package/internals/get-set-iterator.js +1 -1
  18. package/internals/global.js +2 -1
  19. package/internals/ie8-dom-define.js +1 -0
  20. package/internals/internal-metadata.js +1 -0
  21. package/internals/is-array.js +1 -0
  22. package/internals/iterators-core.js +1 -0
  23. package/internals/math-expm1.js +6 -5
  24. package/internals/math-fround.js +1 -0
  25. package/internals/math-log1p.js +1 -0
  26. package/internals/math-sign.js +1 -0
  27. package/internals/native-symbol.js +2 -1
  28. package/internals/number-is-finite.js +1 -0
  29. package/internals/object-assign.js +8 -6
  30. package/internals/object-define-properties.js +1 -0
  31. package/internals/object-define-property.js +4 -3
  32. package/internals/object-get-own-property-descriptor.js +4 -3
  33. package/internals/object-get-own-property-names-external.js +4 -3
  34. package/internals/object-get-own-property-names.js +1 -0
  35. package/internals/object-get-own-property-symbols.js +1 -0
  36. package/internals/object-get-prototype-of.js +1 -0
  37. package/internals/object-keys.js +1 -0
  38. package/internals/object-property-is-enumerable.js +4 -3
  39. package/internals/object-set-prototype-of.js +2 -0
  40. package/internals/regexp-exec.js +2 -1
  41. package/internals/same-value.js +1 -0
  42. package/internals/shared.js +1 -1
  43. package/internals/string-repeat.js +1 -1
  44. package/internals/use-symbol-as-uid.js +1 -1
  45. package/modules/es.array.for-each.js +1 -0
  46. package/modules/es.array.from.js +1 -0
  47. package/modules/es.array.index-of.js +1 -0
  48. package/modules/es.array.last-index-of.js +1 -0
  49. package/modules/es.array.of.js +1 -0
  50. package/modules/es.math.acosh.js +5 -4
  51. package/modules/es.math.asinh.js +3 -2
  52. package/modules/es.math.atanh.js +3 -2
  53. package/modules/es.math.cosh.js +3 -2
  54. package/modules/es.math.expm1.js +1 -0
  55. package/modules/es.math.hypot.js +1 -0
  56. package/modules/es.math.imul.js +3 -2
  57. package/modules/es.math.sinh.js +1 -0
  58. package/modules/es.number.parse-float.js +1 -0
  59. package/modules/es.number.parse-int.js +1 -0
  60. package/modules/es.object.assign.js +1 -0
  61. package/modules/es.object.freeze.js +4 -3
  62. package/modules/es.object.get-own-property-names.js +3 -2
  63. package/modules/es.object.is-extensible.js +4 -3
  64. package/modules/es.object.is-frozen.js +4 -3
  65. package/modules/es.object.is-sealed.js +4 -3
  66. package/modules/es.object.prevent-extensions.js +4 -3
  67. package/modules/es.object.seal.js +4 -3
  68. package/modules/es.reflect.define-property.js +1 -1
  69. package/modules/es.reflect.is-extensible.js +1 -0
  70. package/modules/es.reflect.set.js +1 -1
  71. package/modules/es.regexp.flags.js +1 -0
  72. package/modules/es.string.ends-with.js +4 -3
  73. package/modules/es.string.from-code-point.js +3 -2
  74. package/modules/es.string.match-all.js +1 -0
  75. package/modules/es.string.starts-with.js +4 -3
  76. package/modules/es.string.trim-end.js +1 -0
  77. package/modules/es.string.trim-start.js +1 -0
  78. package/modules/es.typed-array.set.js +1 -1
  79. package/modules/es.typed-array.slice.js +1 -1
  80. package/modules/es.weak-map.js +1 -0
  81. package/modules/esnext.array.is-template-object.js +1 -0
  82. package/modules/esnext.bigint.range.js +1 -1
  83. package/package.json +2 -2
  84. package/stable/index.js +220 -4
  85. package/stage/1.js +0 -1
  86. package/stage/2.js +1 -0
package/index.js CHANGED
@@ -1,6 +1 @@
1
- require('./es');
2
- require('./proposals');
3
- require('./web');
4
- var path = require('./internals/path');
5
-
6
- module.exports = path;
1
+ module.exports = require('./features');
@@ -1 +1,2 @@
1
+ // eslint-disable-next-line es/no-typed-arrays -- safe
1
2
  module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
@@ -206,15 +206,15 @@ if (!NATIVE_ARRAY_BUFFER) {
206
206
 
207
207
  // iOS Safari 7.x bug
208
208
  var testView = new $DataView(new $ArrayBuffer(2));
209
- var nativeSetInt8 = $DataViewPrototype.setInt8;
209
+ var $setInt8 = $DataViewPrototype.setInt8;
210
210
  testView.setInt8(0, 2147483648);
211
211
  testView.setInt8(1, 2147483649);
212
212
  if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
213
213
  setInt8: function setInt8(byteOffset, value) {
214
- nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
214
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
215
215
  },
216
216
  setUint8: function setUint8(byteOffset, value) {
217
- nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
217
+ $setInt8.call(this, byteOffset, value << 24 >> 24);
218
218
  }
219
219
  }, { unsafe: true });
220
220
  }
@@ -7,6 +7,7 @@ var min = Math.min;
7
7
 
8
8
  // `Array.prototype.copyWithin` method implementation
9
9
  // https://tc39.es/ecma262/#sec-array.prototype.copywithin
10
+ // eslint-disable-next-line es/no-array-prototype-copywithin -- safe
10
11
  module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
11
12
  var O = toObject(this);
12
13
  var len = toLength(O.length);
@@ -8,4 +8,5 @@ var STRICT_METHOD = arrayMethodIsStrict('forEach');
8
8
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
9
9
  module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
10
10
  return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
11
+ // eslint-disable-next-line es/no-array-prototype-foreach -- safe
11
12
  } : [].forEach;
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
+ /* eslint-disable es/no-array-prototype-lastindexof -- safe */
2
3
  var toIndexedObject = require('../internals/to-indexed-object');
3
4
  var toInteger = require('../internals/to-integer');
4
5
  var toLength = require('../internals/to-length');
5
6
  var arrayMethodIsStrict = require('../internals/array-method-is-strict');
6
7
 
7
8
  var min = Math.min;
8
- var nativeLastIndexOf = [].lastIndexOf;
9
- var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
9
+ var $lastIndexOf = [].lastIndexOf;
10
+ var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
10
11
  var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
11
12
  var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
12
13
 
@@ -14,7 +15,7 @@ var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
14
15
  // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
15
16
  module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
16
17
  // convert -0 to +0
17
- if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
18
+ if (NEGATIVE_ZERO) return $lastIndexOf.apply(this, arguments) || 0;
18
19
  var O = toIndexedObject(this);
19
20
  var length = toLength(O.length);
20
21
  var index = length - 1;
@@ -22,4 +23,4 @@ module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[
22
23
  if (index < 0) index = length + index;
23
24
  for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
24
25
  return -1;
25
- } : nativeLastIndexOf;
26
+ } : $lastIndexOf;
@@ -16,7 +16,7 @@ try {
16
16
  iteratorWithReturn[ITERATOR] = function () {
17
17
  return this;
18
18
  };
19
- // eslint-disable-next-line no-throw-literal -- required for testing
19
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
20
20
  Array.from(iteratorWithReturn, function () { throw 2; });
21
21
  } catch (error) { /* empty */ }
22
22
 
@@ -3,5 +3,6 @@ var fails = require('../internals/fails');
3
3
  module.exports = !fails(function () {
4
4
  function F() { /* empty */ }
5
5
  F.prototype.constructor = null;
6
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
6
7
  return Object.getPrototypeOf(new F()) !== F.prototype;
7
8
  });
@@ -2,5 +2,6 @@ var fails = require('../internals/fails');
2
2
 
3
3
  // Detect IE8's incomplete defineProperty implementation
4
4
  module.exports = !fails(function () {
5
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
5
6
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
6
7
  });
@@ -25,6 +25,7 @@ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
25
25
  // IE <= 11 replaces $0 with the whole match, as if it was $&
26
26
  // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
27
27
  var REPLACE_KEEPS_$0 = (function () {
28
+ // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
28
29
  return 'a'.replace(/./, '$0') === '$0';
29
30
  })();
30
31
 
@@ -1,5 +1,6 @@
1
1
  var fails = require('../internals/fails');
2
2
 
3
3
  module.exports = !fails(function () {
4
+ // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
4
5
  return Object.isExtensible(Object.preventExtensions({}));
5
6
  });
@@ -2,6 +2,6 @@ var IS_PURE = require('../internals/is-pure');
2
2
  var getIterator = require('../internals/get-iterator');
3
3
 
4
4
  module.exports = IS_PURE ? getIterator : function (it) {
5
- // eslint-disable-next-line no-undef -- safe
5
+ // eslint-disable-next-line es/no-map -- safe
6
6
  return Map.prototype.entries.call(it);
7
7
  };
@@ -2,6 +2,6 @@ var IS_PURE = require('../internals/is-pure');
2
2
  var getIterator = require('../internals/get-iterator');
3
3
 
4
4
  module.exports = IS_PURE ? getIterator : function (it) {
5
- // eslint-disable-next-line no-undef -- safe
5
+ // eslint-disable-next-line es/no-set -- safe
6
6
  return Set.prototype.values.call(it);
7
7
  };
@@ -4,9 +4,10 @@ var check = function (it) {
4
4
 
5
5
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
6
6
  module.exports =
7
- /* global globalThis -- safe */
7
+ // eslint-disable-next-line es/no-global-this -- safe
8
8
  check(typeof globalThis == 'object' && globalThis) ||
9
9
  check(typeof window == 'object' && window) ||
10
+ // eslint-disable-next-line no-restricted-globals -- safe
10
11
  check(typeof self == 'object' && self) ||
11
12
  check(typeof global == 'object' && global) ||
12
13
  // eslint-disable-next-line no-new-func -- fallback
@@ -4,6 +4,7 @@ var createElement = require('../internals/document-create-element');
4
4
 
5
5
  // Thank's IE8 for his funny defineProperty
6
6
  module.exports = !DESCRIPTORS && !fails(function () {
7
+ // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
7
8
  return Object.defineProperty(createElement('div'), 'a', {
8
9
  get: function () { return 7; }
9
10
  }).a != 7;
@@ -8,6 +8,7 @@ var FREEZING = require('../internals/freezing');
8
8
  var METADATA = uid('meta');
9
9
  var id = 0;
10
10
 
11
+ // eslint-disable-next-line es/no-object-isextensible -- safe
11
12
  var isExtensible = Object.isExtensible || function () {
12
13
  return true;
13
14
  };
@@ -2,6 +2,7 @@ var classof = require('../internals/classof-raw');
2
2
 
3
3
  // `IsArray` abstract operation
4
4
  // https://tc39.es/ecma262/#sec-isarray
5
+ // eslint-disable-next-line es/no-array-isarray -- safe
5
6
  module.exports = Array.isArray || function isArray(arg) {
6
7
  return classof(arg) == 'Array';
7
8
  };
@@ -15,6 +15,7 @@ var returnThis = function () { return this; };
15
15
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
16
16
  var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
17
17
 
18
+ /* eslint-disable es/no-array-prototype-keys -- safe */
18
19
  if ([].keys) {
19
20
  arrayIterator = [].keys();
20
21
  // Safari 8 has buggy iterators w/o `next`
@@ -1,13 +1,14 @@
1
- var nativeExpm1 = Math.expm1;
1
+ // eslint-disable-next-line es/no-math-expm1 -- safe
2
+ var $expm1 = Math.expm1;
2
3
  var exp = Math.exp;
3
4
 
4
5
  // `Math.expm1` method implementation
5
6
  // https://tc39.es/ecma262/#sec-math.expm1
6
- module.exports = (!nativeExpm1
7
+ module.exports = (!$expm1
7
8
  // Old FF bug
8
- || nativeExpm1(10) > 22025.465794806719 || nativeExpm1(10) < 22025.4657948067165168
9
+ || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168
9
10
  // Tor Browser bug
10
- || nativeExpm1(-2e-17) != -2e-17
11
+ || $expm1(-2e-17) != -2e-17
11
12
  ) ? function expm1(x) {
12
13
  return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1;
13
- } : nativeExpm1;
14
+ } : $expm1;
@@ -13,6 +13,7 @@ var roundTiesToEven = function (n) {
13
13
 
14
14
  // `Math.fround` method implementation
15
15
  // https://tc39.es/ecma262/#sec-math.fround
16
+ // eslint-disable-next-line es/no-math-fround -- safe
16
17
  module.exports = Math.fround || function fround(x) {
17
18
  var $abs = abs(x);
18
19
  var $sign = sign(x);
@@ -2,6 +2,7 @@ var log = Math.log;
2
2
 
3
3
  // `Math.log1p` method implementation
4
4
  // https://tc39.es/ecma262/#sec-math.log1p
5
+ // eslint-disable-next-line es/no-math-log1p -- safe
5
6
  module.exports = Math.log1p || function log1p(x) {
6
7
  return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x);
7
8
  };
@@ -1,5 +1,6 @@
1
1
  // `Math.sign` method implementation
2
2
  // https://tc39.es/ecma262/#sec-math.sign
3
+ // eslint-disable-next-line es/no-math-sign -- safe
3
4
  module.exports = Math.sign || function sign(x) {
4
5
  // eslint-disable-next-line no-self-compare -- NaN check
5
6
  return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
@@ -2,8 +2,9 @@ var IS_NODE = require('../internals/engine-is-node');
2
2
  var V8_VERSION = require('../internals/engine-v8-version');
3
3
  var fails = require('../internals/fails');
4
4
 
5
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
5
6
  module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
6
- /* global Symbol -- required for testing */
7
+ // eslint-disable-next-line es/no-symbol -- required for testing
7
8
  return !Symbol.sham &&
8
9
  // Chrome 38 Symbol has incorrect toString conversion
9
10
  // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
@@ -4,6 +4,7 @@ var globalIsFinite = global.isFinite;
4
4
 
5
5
  // `Number.isFinite` method
6
6
  // https://tc39.es/ecma262/#sec-number.isfinite
7
+ // eslint-disable-next-line es/no-number-isfinite -- safe
7
8
  module.exports = Number.isFinite || function isFinite(it) {
8
9
  return typeof it == 'number' && globalIsFinite(it);
9
10
  };
@@ -7,14 +7,16 @@ var propertyIsEnumerableModule = require('../internals/object-property-is-enumer
7
7
  var toObject = require('../internals/to-object');
8
8
  var IndexedObject = require('../internals/indexed-object');
9
9
 
10
- var nativeAssign = Object.assign;
10
+ // eslint-disable-next-line es/no-object-assign -- safe
11
+ var $assign = Object.assign;
12
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
11
13
  var defineProperty = Object.defineProperty;
12
14
 
13
15
  // `Object.assign` method
14
16
  // https://tc39.es/ecma262/#sec-object.assign
15
- module.exports = !nativeAssign || fails(function () {
17
+ module.exports = !$assign || fails(function () {
16
18
  // should have correct order of operations (Edge bug)
17
- if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
19
+ if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
18
20
  enumerable: true,
19
21
  get: function () {
20
22
  defineProperty(this, 'b', {
@@ -26,12 +28,12 @@ module.exports = !nativeAssign || fails(function () {
26
28
  // should work with symbols and should have deterministic property order (V8 bug)
27
29
  var A = {};
28
30
  var B = {};
29
- /* global Symbol -- required for testing */
31
+ // eslint-disable-next-line es/no-symbol -- safe
30
32
  var symbol = Symbol();
31
33
  var alphabet = 'abcdefghijklmnopqrst';
32
34
  A[symbol] = 7;
33
35
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
34
- return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
36
+ return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
35
37
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
36
38
  var T = toObject(target);
37
39
  var argumentsLength = arguments.length;
@@ -49,4 +51,4 @@ module.exports = !nativeAssign || fails(function () {
49
51
  if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
50
52
  }
51
53
  } return T;
52
- } : nativeAssign;
54
+ } : $assign;
@@ -5,6 +5,7 @@ var objectKeys = require('../internals/object-keys');
5
5
 
6
6
  // `Object.defineProperties` method
7
7
  // https://tc39.es/ecma262/#sec-object.defineproperties
8
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
8
9
  module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
9
10
  anObject(O);
10
11
  var keys = objectKeys(Properties);
@@ -3,16 +3,17 @@ var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
3
3
  var anObject = require('../internals/an-object');
4
4
  var toPrimitive = require('../internals/to-primitive');
5
5
 
6
- var nativeDefineProperty = Object.defineProperty;
6
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
7
+ var $defineProperty = Object.defineProperty;
7
8
 
8
9
  // `Object.defineProperty` method
9
10
  // https://tc39.es/ecma262/#sec-object.defineproperty
10
- exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
11
+ exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {
11
12
  anObject(O);
12
13
  P = toPrimitive(P, true);
13
14
  anObject(Attributes);
14
15
  if (IE8_DOM_DEFINE) try {
15
- return nativeDefineProperty(O, P, Attributes);
16
+ return $defineProperty(O, P, Attributes);
16
17
  } catch (error) { /* empty */ }
17
18
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
18
19
  if ('value' in Attributes) O[P] = Attributes.value;
@@ -6,15 +6,16 @@ var toPrimitive = require('../internals/to-primitive');
6
6
  var has = require('../internals/has');
7
7
  var IE8_DOM_DEFINE = require('../internals/ie8-dom-define');
8
8
 
9
- var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
9
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
10
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
10
11
 
11
12
  // `Object.getOwnPropertyDescriptor` method
12
13
  // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
13
- exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
14
+ exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
14
15
  O = toIndexedObject(O);
15
16
  P = toPrimitive(P, true);
16
17
  if (IE8_DOM_DEFINE) try {
17
- return nativeGetOwnPropertyDescriptor(O, P);
18
+ return $getOwnPropertyDescriptor(O, P);
18
19
  } catch (error) { /* empty */ }
19
20
  if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
20
21
  };
@@ -1,5 +1,6 @@
1
+ /* eslint-disable es/no-object-getownpropertynames -- safe */
1
2
  var toIndexedObject = require('../internals/to-indexed-object');
2
- var nativeGetOwnPropertyNames = require('../internals/object-get-own-property-names').f;
3
+ var $getOwnPropertyNames = require('../internals/object-get-own-property-names').f;
3
4
 
4
5
  var toString = {}.toString;
5
6
 
@@ -8,7 +9,7 @@ var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNa
8
9
 
9
10
  var getWindowNames = function (it) {
10
11
  try {
11
- return nativeGetOwnPropertyNames(it);
12
+ return $getOwnPropertyNames(it);
12
13
  } catch (error) {
13
14
  return windowNames.slice();
14
15
  }
@@ -18,5 +19,5 @@ var getWindowNames = function (it) {
18
19
  module.exports.f = function getOwnPropertyNames(it) {
19
20
  return windowNames && toString.call(it) == '[object Window]'
20
21
  ? getWindowNames(it)
21
- : nativeGetOwnPropertyNames(toIndexedObject(it));
22
+ : $getOwnPropertyNames(toIndexedObject(it));
22
23
  };
@@ -5,6 +5,7 @@ var hiddenKeys = enumBugKeys.concat('length', 'prototype');
5
5
 
6
6
  // `Object.getOwnPropertyNames` method
7
7
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
8
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
8
9
  exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
9
10
  return internalObjectKeys(O, hiddenKeys);
10
11
  };
@@ -1 +1,2 @@
1
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1
2
  exports.f = Object.getOwnPropertySymbols;
@@ -8,6 +8,7 @@ var ObjectPrototype = Object.prototype;
8
8
 
9
9
  // `Object.getPrototypeOf` method
10
10
  // https://tc39.es/ecma262/#sec-object.getprototypeof
11
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
11
12
  module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
12
13
  O = toObject(O);
13
14
  if (has(O, IE_PROTO)) return O[IE_PROTO];
@@ -3,6 +3,7 @@ var enumBugKeys = require('../internals/enum-bug-keys');
3
3
 
4
4
  // `Object.keys` method
5
5
  // https://tc39.es/ecma262/#sec-object.keys
6
+ // eslint-disable-next-line es/no-object-keys -- safe
6
7
  module.exports = Object.keys || function keys(O) {
7
8
  return internalObjectKeys(O, enumBugKeys);
8
9
  };
@@ -1,13 +1,14 @@
1
1
  'use strict';
2
- var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
2
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
3
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
3
4
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
4
5
 
5
6
  // Nashorn ~ JDK8 bug
6
- var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
7
+ var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
7
8
 
8
9
  // `Object.prototype.propertyIsEnumerable` method implementation
9
10
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
10
11
  exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
11
12
  var descriptor = getOwnPropertyDescriptor(this, V);
12
13
  return !!descriptor && descriptor.enumerable;
13
- } : nativePropertyIsEnumerable;
14
+ } : $propertyIsEnumerable;
@@ -5,11 +5,13 @@ var aPossiblePrototype = require('../internals/a-possible-prototype');
5
5
  // `Object.setPrototypeOf` method
6
6
  // https://tc39.es/ecma262/#sec-object.setprototypeof
7
7
  // Works with __proto__ only. Old v8 can't work with null proto objects.
8
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
8
9
  module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
9
10
  var CORRECT_SETTER = false;
10
11
  var test = {};
11
12
  var setter;
12
13
  try {
14
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
13
15
  setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
14
16
  setter.call(test, []);
15
17
  CORRECT_SETTER = test instanceof Array;
@@ -1,12 +1,13 @@
1
1
  'use strict';
2
2
  var regexpFlags = require('./regexp-flags');
3
3
  var stickyHelpers = require('./regexp-sticky-helpers');
4
+ var shared = require('./shared');
4
5
 
5
6
  var nativeExec = RegExp.prototype.exec;
6
7
  // This always refers to the native implementation, because the
7
8
  // String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
8
9
  // which loads this file before patching the method.
9
- var nativeReplace = String.prototype.replace;
10
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
10
11
 
11
12
  var patchedExec = nativeExec;
12
13
 
@@ -1,5 +1,6 @@
1
1
  // `SameValue` abstract operation
2
2
  // https://tc39.es/ecma262/#sec-samevalue
3
+ // eslint-disable-next-line es/no-object-is -- safe
3
4
  module.exports = Object.is || function is(x, y) {
4
5
  // eslint-disable-next-line no-self-compare -- NaN check
5
6
  return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
@@ -4,7 +4,7 @@ var store = require('../internals/shared-store');
4
4
  (module.exports = function (key, value) {
5
5
  return store[key] || (store[key] = value !== undefined ? value : {});
6
6
  })('versions', []).push({
7
- version: '3.9.1',
7
+ version: '3.10.0',
8
8
  mode: IS_PURE ? 'pure' : 'global',
9
9
  copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
10
10
  });
@@ -4,7 +4,7 @@ var requireObjectCoercible = require('../internals/require-object-coercible');
4
4
 
5
5
  // `String.prototype.repeat` method implementation
6
6
  // https://tc39.es/ecma262/#sec-string.prototype.repeat
7
- module.exports = ''.repeat || function repeat(count) {
7
+ module.exports = function repeat(count) {
8
8
  var str = String(requireObjectCoercible(this));
9
9
  var result = '';
10
10
  var n = toInteger(count);
@@ -1,6 +1,6 @@
1
+ /* eslint-disable es/no-symbol -- required for testing */
1
2
  var NATIVE_SYMBOL = require('../internals/native-symbol');
2
3
 
3
4
  module.exports = NATIVE_SYMBOL
4
- /* global Symbol -- safe */
5
5
  && !Symbol.sham
6
6
  && typeof Symbol.iterator == 'symbol';
@@ -4,6 +4,7 @@ var forEach = require('../internals/array-for-each');
4
4
 
5
5
  // `Array.prototype.forEach` method
6
6
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
7
+ // eslint-disable-next-line es/no-array-prototype-foreach -- safe
7
8
  $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
8
9
  forEach: forEach
9
10
  });
@@ -3,6 +3,7 @@ var from = require('../internals/array-from');
3
3
  var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');
4
4
 
5
5
  var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
6
+ // eslint-disable-next-line es/no-array-from -- required for testing
6
7
  Array.from(iterable);
7
8
  });
8
9
 
@@ -1,4 +1,5 @@
1
1
  'use strict';
2
+ /* eslint-disable es/no-array-prototype-indexof -- required for testing */
2
3
  var $ = require('../internals/export');
3
4
  var $indexOf = require('../internals/array-includes').indexOf;
4
5
  var arrayMethodIsStrict = require('../internals/array-method-is-strict');
@@ -3,6 +3,7 @@ var lastIndexOf = require('../internals/array-last-index-of');
3
3
 
4
4
  // `Array.prototype.lastIndexOf` method
5
5
  // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
6
+ // eslint-disable-next-line es/no-array-prototype-lastindexof -- required for testing
6
7
  $({ target: 'Array', proto: true, forced: lastIndexOf !== [].lastIndexOf }, {
7
8
  lastIndexOf: lastIndexOf
8
9
  });
@@ -5,6 +5,7 @@ var createProperty = require('../internals/create-property');
5
5
 
6
6
  var ISNT_GENERIC = fails(function () {
7
7
  function F() { /* empty */ }
8
+ // eslint-disable-next-line es/no-array-of -- required for testing
8
9
  return !(Array.of.call(F) instanceof F);
9
10
  });
10
11
 
@@ -1,16 +1,17 @@
1
1
  var $ = require('../internals/export');
2
2
  var log1p = require('../internals/math-log1p');
3
3
 
4
- var nativeAcosh = Math.acosh;
4
+ // eslint-disable-next-line es/no-math-acosh -- required for testing
5
+ var $acosh = Math.acosh;
5
6
  var log = Math.log;
6
7
  var sqrt = Math.sqrt;
7
8
  var LN2 = Math.LN2;
8
9
 
9
- var FORCED = !nativeAcosh
10
+ var FORCED = !$acosh
10
11
  // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
11
- || Math.floor(nativeAcosh(Number.MAX_VALUE)) != 710
12
+ || Math.floor($acosh(Number.MAX_VALUE)) != 710
12
13
  // Tor Browser bug: Math.acosh(Infinity) -> NaN
13
- || nativeAcosh(Infinity) != Infinity;
14
+ || $acosh(Infinity) != Infinity;
14
15
 
15
16
  // `Math.acosh` method
16
17
  // https://tc39.es/ecma262/#sec-math.acosh
@@ -1,6 +1,7 @@
1
1
  var $ = require('../internals/export');
2
2
 
3
- var nativeAsinh = Math.asinh;
3
+ // eslint-disable-next-line es/no-math-asinh -- required for testing
4
+ var $asinh = Math.asinh;
4
5
  var log = Math.log;
5
6
  var sqrt = Math.sqrt;
6
7
 
@@ -11,6 +12,6 @@ function asinh(x) {
11
12
  // `Math.asinh` method
12
13
  // https://tc39.es/ecma262/#sec-math.asinh
13
14
  // Tor Browser bug: Math.asinh(0) -> -0
14
- $({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) }, {
15
+ $({ target: 'Math', stat: true, forced: !($asinh && 1 / $asinh(0) > 0) }, {
15
16
  asinh: asinh
16
17
  });
@@ -1,12 +1,13 @@
1
1
  var $ = require('../internals/export');
2
2
 
3
- var nativeAtanh = Math.atanh;
3
+ // eslint-disable-next-line es/no-math-atanh -- required for testing
4
+ var $atanh = Math.atanh;
4
5
  var log = Math.log;
5
6
 
6
7
  // `Math.atanh` method
7
8
  // https://tc39.es/ecma262/#sec-math.atanh
8
9
  // Tor Browser bug: Math.atanh(-0) -> 0
9
- $({ target: 'Math', stat: true, forced: !(nativeAtanh && 1 / nativeAtanh(-0) < 0) }, {
10
+ $({ target: 'Math', stat: true, forced: !($atanh && 1 / $atanh(-0) < 0) }, {
10
11
  atanh: function atanh(x) {
11
12
  return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2;
12
13
  }
@@ -1,13 +1,14 @@
1
1
  var $ = require('../internals/export');
2
2
  var expm1 = require('../internals/math-expm1');
3
3
 
4
- var nativeCosh = Math.cosh;
4
+ // eslint-disable-next-line es/no-math-cosh -- required for testing
5
+ var $cosh = Math.cosh;
5
6
  var abs = Math.abs;
6
7
  var E = Math.E;
7
8
 
8
9
  // `Math.cosh` method
9
10
  // https://tc39.es/ecma262/#sec-math.cosh
10
- $({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infinity }, {
11
+ $({ target: 'Math', stat: true, forced: !$cosh || $cosh(710) === Infinity }, {
11
12
  cosh: function cosh(x) {
12
13
  var t = expm1(abs(x) - 1) + 1;
13
14
  return (t + 1 / (t * E * E)) * (E / 2);
@@ -3,4 +3,5 @@ var expm1 = require('../internals/math-expm1');
3
3
 
4
4
  // `Math.expm1` method
5
5
  // https://tc39.es/ecma262/#sec-math.expm1
6
+ // eslint-disable-next-line es/no-math-expm1 -- required for testing
6
7
  $({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });