core-js 3.32.0 → 3.32.2

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 (108) hide show
  1. package/internals/add-to-unscopables.js +1 -1
  2. package/internals/array-buffer-byte-length.js +1 -1
  3. package/internals/array-buffer-transfer.js +1 -1
  4. package/internals/array-buffer.js +1 -1
  5. package/internals/array-includes.js +2 -2
  6. package/internals/array-iteration-from-last.js +1 -1
  7. package/internals/array-iteration.js +7 -7
  8. package/internals/array-slice-simple.js +2 -1
  9. package/internals/async-iterator-iteration.js +4 -4
  10. package/internals/caller.js +1 -1
  11. package/internals/check-correctness-of-iteration.js +3 -1
  12. package/internals/classof.js +2 -2
  13. package/internals/collection-strong.js +5 -5
  14. package/internals/collection.js +6 -6
  15. package/internals/date-to-iso-string.js +1 -1
  16. package/internals/descriptors.js +1 -1
  17. package/internals/engine-is-node.js +2 -1
  18. package/internals/fix-regexp-well-known-symbol-logic.js +5 -2
  19. package/internals/function-bind.js +3 -1
  20. package/internals/get-json-replacer-function.js +1 -1
  21. package/internals/get-set-record.js +1 -1
  22. package/internals/global.js +1 -1
  23. package/internals/host-report-errors.js +1 -1
  24. package/internals/ie8-dom-define.js +1 -1
  25. package/internals/ieee754.js +25 -14
  26. package/internals/indexed-object.js +1 -1
  27. package/internals/is-array.js +1 -1
  28. package/internals/is-big-int-array.js +1 -1
  29. package/internals/is-forced.js +2 -2
  30. package/internals/is-regexp.js +1 -1
  31. package/internals/iterator-define.js +7 -4
  32. package/internals/math-expm1.js +3 -2
  33. package/internals/math-fround.js +1 -1
  34. package/internals/math-scale.js +1 -1
  35. package/internals/math-sign.js +1 -1
  36. package/internals/number-parse-float.js +1 -1
  37. package/internals/numeric-range-iterator.js +1 -1
  38. package/internals/object-assign.js +2 -2
  39. package/internals/object-get-own-property-names-external.js +1 -1
  40. package/internals/object-is-extensible.js +1 -1
  41. package/internals/parse-json-string.js +3 -3
  42. package/internals/regexp-sticky-helpers.js +2 -2
  43. package/internals/same-value-zero.js +1 -1
  44. package/internals/same-value.js +1 -1
  45. package/internals/schedulers-fix.js +1 -1
  46. package/internals/shared.js +2 -2
  47. package/internals/string-pad.js +1 -1
  48. package/internals/string-punycode-to-ascii.js +4 -4
  49. package/internals/string-repeat.js +1 -1
  50. package/internals/structured-clone-proper-transfer.js +1 -1
  51. package/internals/symbol-constructor-detection.js +1 -1
  52. package/internals/symbol-is-well-known.js +1 -0
  53. package/internals/typed-array-constructor.js +2 -2
  54. package/internals/v8-prototype-define-bug.js +1 -1
  55. package/modules/es.array.for-each.js +1 -1
  56. package/modules/es.array.iterator.js +4 -3
  57. package/modules/es.array.join.js +1 -1
  58. package/modules/es.date.set-year.js +1 -1
  59. package/modules/es.date.to-string.js +1 -1
  60. package/modules/es.json.stringify.js +4 -4
  61. package/modules/es.math.acosh.js +2 -2
  62. package/modules/es.math.asinh.js +1 -1
  63. package/modules/es.math.atanh.js +1 -1
  64. package/modules/es.math.expm1.js +1 -1
  65. package/modules/es.math.imul.js +1 -1
  66. package/modules/es.math.sinh.js +1 -1
  67. package/modules/es.math.tanh.js +1 -1
  68. package/modules/es.number.constructor.js +14 -3
  69. package/modules/es.number.is-nan.js +1 -1
  70. package/modules/es.number.parse-float.js +1 -1
  71. package/modules/es.number.parse-int.js +1 -1
  72. package/modules/es.number.to-fixed.js +1 -1
  73. package/modules/es.object.is-frozen.js +1 -1
  74. package/modules/es.object.is-sealed.js +1 -1
  75. package/modules/es.parse-float.js +1 -1
  76. package/modules/es.parse-int.js +1 -1
  77. package/modules/es.promise.constructor.js +2 -2
  78. package/modules/es.reflect.construct.js +1 -1
  79. package/modules/es.regexp.constructor.js +2 -2
  80. package/modules/es.regexp.to-string.js +2 -2
  81. package/modules/es.string.from-code-point.js +1 -1
  82. package/modules/es.string.is-well-formed.js +2 -2
  83. package/modules/es.string.match-all.js +1 -1
  84. package/modules/es.string.replace.js +8 -3
  85. package/modules/es.string.split.js +4 -4
  86. package/modules/es.string.to-well-formed.js +2 -2
  87. package/modules/es.symbol.constructor.js +1 -1
  88. package/modules/es.symbol.description.js +1 -1
  89. package/modules/es.typed-array.to-locale-string.js +1 -1
  90. package/modules/es.typed-array.to-string.js +1 -1
  91. package/modules/es.weak-map.constructor.js +2 -2
  92. package/modules/esnext.array.last-index.js +1 -1
  93. package/modules/esnext.array.last-item.js +2 -2
  94. package/modules/esnext.async-disposable-stack.constructor.js +3 -3
  95. package/modules/esnext.composite-symbol.js +1 -1
  96. package/modules/esnext.disposable-stack.constructor.js +3 -3
  97. package/modules/esnext.json.parse.js +15 -15
  98. package/modules/esnext.json.raw-json.js +3 -3
  99. package/modules/esnext.math.signbit.js +1 -1
  100. package/modules/esnext.number.from-string.js +1 -1
  101. package/modules/esnext.set.intersection.v2.js +1 -1
  102. package/modules/esnext.string.dedent.js +8 -3
  103. package/modules/web.atob.js +2 -2
  104. package/modules/web.dom-exception.constructor.js +1 -1
  105. package/modules/web.structured-clone.js +4 -4
  106. package/modules/web.url.constructor.js +129 -125
  107. package/package.json +1 -1
  108. package/postinstall.js +1 -0
@@ -8,7 +8,7 @@ var $RegExp = global.RegExp;
8
8
  var UNSUPPORTED_Y = fails(function () {
9
9
  var re = $RegExp('a', 'y');
10
10
  re.lastIndex = 2;
11
- return re.exec('abcd') != null;
11
+ return re.exec('abcd') !== null;
12
12
  });
13
13
 
14
14
  // UC Browser bug
@@ -21,7 +21,7 @@ var BROKEN_CARET = UNSUPPORTED_Y || fails(function () {
21
21
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
22
22
  var re = $RegExp('^r', 'gy');
23
23
  re.lastIndex = 2;
24
- return re.exec('str') != null;
24
+ return re.exec('str') !== null;
25
25
  });
26
26
 
27
27
  module.exports = {
@@ -3,5 +3,5 @@
3
3
  // https://tc39.es/ecma262/#sec-samevaluezero
4
4
  module.exports = function (x, y) {
5
5
  // eslint-disable-next-line no-self-compare -- NaN check
6
- return x === y || x != x && y != y;
6
+ return x === y || x !== x && y !== y;
7
7
  };
@@ -4,5 +4,5 @@
4
4
  // eslint-disable-next-line es/no-object-is -- safe
5
5
  module.exports = Object.is || function is(x, y) {
6
6
  // eslint-disable-next-line no-self-compare -- NaN check
7
- return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
7
+ return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
8
8
  };
@@ -11,7 +11,7 @@ var Function = global.Function;
11
11
  // dirty IE9- and Bun 0.3.0- checks
12
12
  var WRAP = /MSIE .\./.test(USER_AGENT) || ENGINE_IS_BUN && (function () {
13
13
  var version = global.Bun.version.split('.');
14
- return version.length < 3 || version[0] == 0 && (version[1] < 3 || version[1] == 3 && version[2] == 0);
14
+ return version.length < 3 || version[0] === '0' && (version[1] < 3 || version[1] === '3' && version[2] === '0');
15
15
  })();
16
16
 
17
17
  // IE9- / Bun 0.3.0- setTimeout / setInterval / setImmediate additional parameters fix
@@ -5,9 +5,9 @@ var store = require('../internals/shared-store');
5
5
  (module.exports = function (key, value) {
6
6
  return store[key] || (store[key] = value !== undefined ? value : {});
7
7
  })('versions', []).push({
8
- version: '3.32.0',
8
+ version: '3.32.2',
9
9
  mode: IS_PURE ? 'pure' : 'global',
10
10
  copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
11
- license: 'https://github.com/zloirock/core-js/blob/v3.32.0/LICENSE',
11
+ license: 'https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE',
12
12
  source: 'https://github.com/zloirock/core-js'
13
13
  });
@@ -18,7 +18,7 @@ var createMethod = function (IS_END) {
18
18
  var stringLength = S.length;
19
19
  var fillStr = fillString === undefined ? ' ' : toString(fillString);
20
20
  var fillLen, stringFiller;
21
- if (intMaxLength <= stringLength || fillStr == '') return S;
21
+ if (intMaxLength <= stringLength || fillStr === '') return S;
22
22
  fillLen = intMaxLength - stringLength;
23
23
  stringFiller = repeat(fillStr, ceil(fillLen / fillStr.length));
24
24
  if (stringFiller.length > fillLen) stringFiller = stringSlice(stringFiller, 0, fillLen);
@@ -43,7 +43,7 @@ var ucs2decode = function (string) {
43
43
  if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
44
44
  // It's a high surrogate, and there is a next character.
45
45
  var extra = charCodeAt(string, counter++);
46
- if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
46
+ if ((extra & 0xFC00) === 0xDC00) { // Low surrogate.
47
47
  push(output, ((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
48
48
  } else {
49
49
  // It's an unmatched surrogate; only append this code unit, in case the
@@ -142,12 +142,12 @@ var encode = function (input) {
142
142
  if (currentValue < n && ++delta > maxInt) {
143
143
  throw $RangeError(OVERFLOW_ERROR);
144
144
  }
145
- if (currentValue == n) {
145
+ if (currentValue === n) {
146
146
  // Represent delta as a generalized variable-length integer.
147
147
  var q = delta;
148
148
  var k = base;
149
149
  while (true) {
150
- var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
150
+ var t = k <= bias ? tMin : k >= bias + tMax ? tMax : k - bias;
151
151
  if (q < t) break;
152
152
  var qMinusT = q - t;
153
153
  var baseMinusT = base - t;
@@ -157,7 +157,7 @@ var encode = function (input) {
157
157
  }
158
158
 
159
159
  push(output, fromCharCode(digitToBasic(q)));
160
- bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
160
+ bias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);
161
161
  delta = 0;
162
162
  handledCPCount++;
163
163
  }
@@ -11,7 +11,7 @@ module.exports = function repeat(count) {
11
11
  var str = toString(requireObjectCoercible(this));
12
12
  var result = '';
13
13
  var n = toIntegerOrInfinity(count);
14
- if (n < 0 || n == Infinity) throw $RangeError('Wrong number of repetitions');
14
+ if (n < 0 || n === Infinity) throw $RangeError('Wrong number of repetitions');
15
15
  for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
16
16
  return result;
17
17
  };
@@ -14,5 +14,5 @@ module.exports = !!structuredClone && !fails(function () {
14
14
  if ((IS_DENO && V8 > 92) || (IS_NODE && V8 > 94) || (IS_BROWSER && V8 > 97)) return false;
15
15
  var buffer = new ArrayBuffer(8);
16
16
  var clone = structuredClone(buffer, { transfer: [buffer] });
17
- return buffer.byteLength != 0 || clone.byteLength != 8;
17
+ return buffer.byteLength !== 0 || clone.byteLength !== 8;
18
18
  });
@@ -8,7 +8,7 @@ var $String = global.String;
8
8
 
9
9
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
10
10
  module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
11
- var symbol = Symbol();
11
+ var symbol = Symbol('symbol detection');
12
12
  // Chrome 38 Symbol has incorrect toString conversion
13
13
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
14
14
  // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
@@ -27,6 +27,7 @@ module.exports = function isWellKnownSymbol(value) {
27
27
  try {
28
28
  var symbol = thisSymbolValue(value);
29
29
  for (var j = 0, keys = getOwnPropertyNames(WellKnownSymbolsStore), keysLength = keys.length; j < keysLength; j++) {
30
+ // eslint-disable-next-line eqeqeq -- polyfilled symbols case
30
31
  if (WellKnownSymbolsStore[keys[j]] == symbol) return true;
31
32
  }
32
33
  } catch (error) { /* empty */ }
@@ -70,7 +70,7 @@ var addGetter = function (it, key) {
70
70
 
71
71
  var isArrayBuffer = function (it) {
72
72
  var klass;
73
- return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
73
+ return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) === 'ArrayBuffer' || klass === 'SharedArrayBuffer';
74
74
  };
75
75
 
76
76
  var isTypedArrayIndex = function (target, key) {
@@ -226,7 +226,7 @@ if (DESCRIPTORS) {
226
226
  createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
227
227
  }
228
228
 
229
- var FORCED = TypedArrayConstructor != NativeTypedArrayConstructor;
229
+ var FORCED = TypedArrayConstructor !== NativeTypedArrayConstructor;
230
230
 
231
231
  exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
232
232
 
@@ -9,5 +9,5 @@ module.exports = DESCRIPTORS && fails(function () {
9
9
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
10
10
  value: 42,
11
11
  writable: false
12
- }).prototype != 42;
12
+ }).prototype !== 42;
13
13
  });
@@ -5,6 +5,6 @@ var forEach = require('../internals/array-for-each');
5
5
  // `Array.prototype.forEach` method
6
6
  // https://tc39.es/ecma262/#sec-array.prototype.foreach
7
7
  // eslint-disable-next-line es/no-array-prototype-foreach -- safe
8
- $({ target: 'Array', proto: true, forced: [].forEach != forEach }, {
8
+ $({ target: 'Array', proto: true, forced: [].forEach !== forEach }, {
9
9
  forEach: forEach
10
10
  });
@@ -41,9 +41,10 @@ module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
41
41
  state.target = undefined;
42
42
  return createIterResultObject(undefined, true);
43
43
  }
44
- if (kind == 'keys') return createIterResultObject(index, false);
45
- if (kind == 'values') return createIterResultObject(target[index], false);
46
- return createIterResultObject([index, target[index]], false);
44
+ switch (kind) {
45
+ case 'keys': return createIterResultObject(index, false);
46
+ case 'values': return createIterResultObject(target[index], false);
47
+ } return createIterResultObject([index, target[index]], false);
47
48
  }, 'values');
48
49
 
49
50
  // argumentsList[@@iterator] is %ArrayProto_values%
@@ -7,7 +7,7 @@ var arrayMethodIsStrict = require('../internals/array-method-is-strict');
7
7
 
8
8
  var nativeJoin = uncurryThis([].join);
9
9
 
10
- var ES3_STRINGS = IndexedObject != Object;
10
+ var ES3_STRINGS = IndexedObject !== Object;
11
11
  var FORCED = ES3_STRINGS || !arrayMethodIsStrict('join', ',');
12
12
 
13
13
  // `Array.prototype.join` method
@@ -14,7 +14,7 @@ $({ target: 'Date', proto: true }, {
14
14
  // validate
15
15
  thisTimeValue(this);
16
16
  var yi = toIntegerOrInfinity(year);
17
- var yyyy = 0 <= yi && yi <= 99 ? yi + 1900 : yi;
17
+ var yyyy = yi >= 0 && yi <= 99 ? yi + 1900 : yi;
18
18
  return setFullYear(this, yyyy);
19
19
  }
20
20
  });
@@ -11,7 +11,7 @@ var thisTimeValue = uncurryThis(DatePrototype.getTime);
11
11
 
12
12
  // `Date.prototype.toString` method
13
13
  // https://tc39.es/ecma262/#sec-date.prototype.tostring
14
- if (String(new Date(NaN)) != INVALID_DATE) {
14
+ if (String(new Date(NaN)) !== INVALID_DATE) {
15
15
  defineBuiltIn(DatePrototype, TO_STRING, function toString() {
16
16
  var value = thisTimeValue(this);
17
17
  // eslint-disable-next-line no-self-compare -- NaN check
@@ -24,13 +24,13 @@ var low = /^[\uD800-\uDBFF]$/;
24
24
  var hi = /^[\uDC00-\uDFFF]$/;
25
25
 
26
26
  var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails(function () {
27
- var symbol = getBuiltIn('Symbol')();
27
+ var symbol = getBuiltIn('Symbol')('stringify detection');
28
28
  // MS Edge converts symbol values to JSON as {}
29
- return $stringify([symbol]) != '[null]'
29
+ return $stringify([symbol]) !== '[null]'
30
30
  // WebKit converts symbol values to JSON as null
31
- || $stringify({ a: symbol }) != '{}'
31
+ || $stringify({ a: symbol }) !== '{}'
32
32
  // V8 throws on boxed symbols
33
- || $stringify(Object(symbol)) != '{}';
33
+ || $stringify(Object(symbol)) !== '{}';
34
34
  });
35
35
 
36
36
  // https://github.com/tc39/proposal-well-formed-stringify
@@ -10,9 +10,9 @@ var LN2 = Math.LN2;
10
10
 
11
11
  var FORCED = !$acosh
12
12
  // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
13
- || Math.floor($acosh(Number.MAX_VALUE)) != 710
13
+ || Math.floor($acosh(Number.MAX_VALUE)) !== 710
14
14
  // Tor Browser bug: Math.acosh(Infinity) -> NaN
15
- || $acosh(Infinity) != Infinity;
15
+ || $acosh(Infinity) !== Infinity;
16
16
 
17
17
  // `Math.acosh` method
18
18
  // https://tc39.es/ecma262/#sec-math.acosh
@@ -8,7 +8,7 @@ var sqrt = Math.sqrt;
8
8
 
9
9
  function asinh(x) {
10
10
  var n = +x;
11
- return !isFinite(n) || n == 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1));
11
+ return !isFinite(n) || n === 0 ? n : n < 0 ? -asinh(-n) : log(n + sqrt(n * n + 1));
12
12
  }
13
13
 
14
14
  var FORCED = !($asinh && 1 / $asinh(0) > 0);
@@ -13,6 +13,6 @@ var FORCED = !($atanh && 1 / $atanh(-0) < 0);
13
13
  $({ target: 'Math', stat: true, forced: FORCED }, {
14
14
  atanh: function atanh(x) {
15
15
  var n = +x;
16
- return n == 0 ? n : log((1 + n) / (1 - n)) / 2;
16
+ return n === 0 ? n : log((1 + n) / (1 - n)) / 2;
17
17
  }
18
18
  });
@@ -5,4 +5,4 @@ var expm1 = require('../internals/math-expm1');
5
5
  // `Math.expm1` method
6
6
  // https://tc39.es/ecma262/#sec-math.expm1
7
7
  // eslint-disable-next-line es/no-math-expm1 -- required for testing
8
- $({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });
8
+ $({ target: 'Math', stat: true, forced: expm1 !== Math.expm1 }, { expm1: expm1 });
@@ -6,7 +6,7 @@ var fails = require('../internals/fails');
6
6
  var $imul = Math.imul;
7
7
 
8
8
  var FORCED = fails(function () {
9
- return $imul(0xFFFFFFFF, 5) != -5 || $imul.length != 2;
9
+ return $imul(0xFFFFFFFF, 5) !== -5 || $imul.length !== 2;
10
10
  });
11
11
 
12
12
  // `Math.imul` method
@@ -9,7 +9,7 @@ var E = Math.E;
9
9
 
10
10
  var FORCED = fails(function () {
11
11
  // eslint-disable-next-line es/no-math-sinh -- required for testing
12
- return Math.sinh(-2e-17) != -2e-17;
12
+ return Math.sinh(-2e-17) !== -2e-17;
13
13
  });
14
14
 
15
15
  // `Math.sinh` method
@@ -11,6 +11,6 @@ $({ target: 'Math', stat: true }, {
11
11
  var n = +x;
12
12
  var a = expm1(n);
13
13
  var b = expm1(-n);
14
- return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(n) + exp(-n));
14
+ return a === Infinity ? 1 : b === Infinity ? -1 : (a - b) / (exp(n) + exp(-n));
15
15
  }
16
16
  });
@@ -47,9 +47,20 @@ var toNumber = function (argument) {
47
47
  if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
48
48
  } else if (first === 48) {
49
49
  switch (charCodeAt(it, 1)) {
50
- case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
51
- case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
52
- default: return +it;
50
+ // fast equal of /^0b[01]+$/i
51
+ case 66:
52
+ case 98:
53
+ radix = 2;
54
+ maxCode = 49;
55
+ break;
56
+ // fast equal of /^0o[0-7]+$/i
57
+ case 79:
58
+ case 111:
59
+ radix = 8;
60
+ maxCode = 55;
61
+ break;
62
+ default:
63
+ return +it;
53
64
  }
54
65
  digits = stringSlice(it, 2);
55
66
  length = digits.length;
@@ -6,6 +6,6 @@ var $ = require('../internals/export');
6
6
  $({ target: 'Number', stat: true }, {
7
7
  isNaN: function isNaN(number) {
8
8
  // eslint-disable-next-line no-self-compare -- NaN check
9
- return number != number;
9
+ return number !== number;
10
10
  }
11
11
  });
@@ -5,6 +5,6 @@ var parseFloat = require('../internals/number-parse-float');
5
5
  // `Number.parseFloat` method
6
6
  // https://tc39.es/ecma262/#sec-number.parseFloat
7
7
  // eslint-disable-next-line es/no-number-parsefloat -- required for testing
8
- $({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {
8
+ $({ target: 'Number', stat: true, forced: Number.parseFloat !== parseFloat }, {
9
9
  parseFloat: parseFloat
10
10
  });
@@ -5,6 +5,6 @@ var parseInt = require('../internals/number-parse-int');
5
5
  // `Number.parseInt` method
6
6
  // https://tc39.es/ecma262/#sec-number.parseint
7
7
  // eslint-disable-next-line es/no-number-parseint -- required for testing
8
- $({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {
8
+ $({ target: 'Number', stat: true, forced: Number.parseInt !== parseInt }, {
9
9
  parseInt: parseInt
10
10
  });
@@ -85,7 +85,7 @@ $({ target: 'Number', proto: true, forced: FORCED }, {
85
85
  // TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
86
86
  if (fractDigits < 0 || fractDigits > 20) throw $RangeError('Incorrect fraction digits');
87
87
  // eslint-disable-next-line no-self-compare -- NaN check
88
- if (number != number) return 'NaN';
88
+ if (number !== number) return 'NaN';
89
89
  if (number <= -1e21 || number >= 1e21) return $String(number);
90
90
  if (number < 0) {
91
91
  sign = '-';
@@ -15,7 +15,7 @@ var FORCED = ARRAY_BUFFER_NON_EXTENSIBLE || fails(function () { $isFrozen(1); })
15
15
  $({ target: 'Object', stat: true, forced: FORCED }, {
16
16
  isFrozen: function isFrozen(it) {
17
17
  if (!isObject(it)) return true;
18
- if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return true;
18
+ if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return true;
19
19
  return $isFrozen ? $isFrozen(it) : false;
20
20
  }
21
21
  });
@@ -15,7 +15,7 @@ var FORCED = ARRAY_BUFFER_NON_EXTENSIBLE || fails(function () { $isSealed(1); })
15
15
  $({ target: 'Object', stat: true, forced: FORCED }, {
16
16
  isSealed: function isSealed(it) {
17
17
  if (!isObject(it)) return true;
18
- if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) == 'ArrayBuffer') return true;
18
+ if (ARRAY_BUFFER_NON_EXTENSIBLE && classof(it) === 'ArrayBuffer') return true;
19
19
  return $isSealed ? $isSealed(it) : false;
20
20
  }
21
21
  });
@@ -4,6 +4,6 @@ var $parseFloat = require('../internals/number-parse-float');
4
4
 
5
5
  // `parseFloat` method
6
6
  // https://tc39.es/ecma262/#sec-parsefloat-string
7
- $({ global: true, forced: parseFloat != $parseFloat }, {
7
+ $({ global: true, forced: parseFloat !== $parseFloat }, {
8
8
  parseFloat: $parseFloat
9
9
  });
@@ -4,6 +4,6 @@ var $parseInt = require('../internals/number-parse-int');
4
4
 
5
5
  // `parseInt` method
6
6
  // https://tc39.es/ecma262/#sec-parseint-string-radix
7
- $({ global: true, forced: parseInt != $parseInt }, {
7
+ $({ global: true, forced: parseInt !== $parseInt }, {
8
8
  parseInt: $parseInt
9
9
  });
@@ -57,7 +57,7 @@ var isThenable = function (it) {
57
57
 
58
58
  var callReaction = function (reaction, state) {
59
59
  var value = state.value;
60
- var ok = state.state == FULFILLED;
60
+ var ok = state.state === FULFILLED;
61
61
  var handler = ok ? reaction.ok : reaction.fail;
62
62
  var resolve = reaction.resolve;
63
63
  var reject = reaction.reject;
@@ -233,7 +233,7 @@ if (FORCED_PROMISE_CONSTRUCTOR) {
233
233
  reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
234
234
  reaction.fail = isCallable(onRejected) && onRejected;
235
235
  reaction.domain = IS_NODE ? process.domain : undefined;
236
- if (state.state == PENDING) state.reactions.add(reaction);
236
+ if (state.state === PENDING) state.reactions.add(reaction);
237
237
  else microtask(function () {
238
238
  callReaction(reaction, state);
239
239
  });
@@ -34,7 +34,7 @@ $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
34
34
  anObject(args);
35
35
  var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
36
36
  if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
37
- if (Target == newTarget) {
37
+ if (Target === newTarget) {
38
38
  // w/o altered newTarget, optimization for 0-4 arguments
39
39
  switch (args.length) {
40
40
  case 0: return new Target();
@@ -45,7 +45,7 @@ var BASE_FORCED = DESCRIPTORS &&
45
45
  (!CORRECT_NEW || MISSED_STICKY || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG || fails(function () {
46
46
  re2[MATCH] = false;
47
47
  // RegExp constructor can alter flags and IsRegExp works correct with @@match
48
- return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
48
+ return NativeRegExp(re1) !== re1 || NativeRegExp(re2) === re2 || String(NativeRegExp(re1, 'i')) !== '/a/i';
49
49
  }));
50
50
 
51
51
  var handleDotAll = function (string) {
@@ -86,7 +86,7 @@ var handleNCG = function (string) {
86
86
  for (; index <= length; index++) {
87
87
  chr = charAt(string, index);
88
88
  if (chr === '\\') {
89
- chr = chr + charAt(string, ++index);
89
+ chr += charAt(string, ++index);
90
90
  } else if (chr === ']') {
91
91
  brackets = false;
92
92
  } else if (!brackets) switch (true) {
@@ -10,9 +10,9 @@ var TO_STRING = 'toString';
10
10
  var RegExpPrototype = RegExp.prototype;
11
11
  var nativeToString = RegExpPrototype[TO_STRING];
12
12
 
13
- var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
13
+ var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) !== '/a/b'; });
14
14
  // FF44- RegExp#toString has a wrong name
15
- var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
15
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name !== TO_STRING;
16
16
 
17
17
  // `RegExp.prototype.toString` method
18
18
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
@@ -10,7 +10,7 @@ var $fromCodePoint = String.fromCodePoint;
10
10
  var join = uncurryThis([].join);
11
11
 
12
12
  // length should be 1, old FF problem
13
- var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1;
13
+ var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length !== 1;
14
14
 
15
15
  // `String.fromCodePoint` method
16
16
  // https://tc39.es/ecma262/#sec-string.fromcodepoint
@@ -15,9 +15,9 @@ $({ target: 'String', proto: true }, {
15
15
  for (var i = 0; i < length; i++) {
16
16
  var charCode = charCodeAt(S, i);
17
17
  // single UTF-16 code unit
18
- if ((charCode & 0xF800) != 0xD800) continue;
18
+ if ((charCode & 0xF800) !== 0xD800) continue;
19
19
  // unpaired surrogate
20
- if (charCode >= 0xDC00 || ++i >= length || (charCodeAt(S, i) & 0xFC00) != 0xDC00) return false;
20
+ if (charCode >= 0xDC00 || ++i >= length || (charCodeAt(S, i) & 0xFC00) !== 0xDC00) return false;
21
21
  } return true;
22
22
  }
23
23
  });
@@ -90,7 +90,7 @@ $({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, {
90
90
  }
91
91
  if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll(O, regexp);
92
92
  matcher = getMethod(regexp, MATCH_ALL);
93
- if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll;
93
+ if (matcher === undefined && IS_PURE && classof(regexp) === 'RegExp') matcher = $matchAll;
94
94
  if (matcher) return call(matcher, regexp, O);
95
95
  } else if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll(O, regexp);
96
96
  S = toString(O);
@@ -88,13 +88,16 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
88
88
  if (!functionalReplace) replaceValue = toString(replaceValue);
89
89
 
90
90
  var global = rx.global;
91
+ var fullUnicode;
91
92
  if (global) {
92
- var fullUnicode = rx.unicode;
93
+ fullUnicode = rx.unicode;
93
94
  rx.lastIndex = 0;
94
95
  }
96
+
95
97
  var results = [];
98
+ var result;
96
99
  while (true) {
97
- var result = regExpExec(rx, S);
100
+ result = regExpExec(rx, S);
98
101
  if (result === null) break;
99
102
 
100
103
  push(results, result);
@@ -112,6 +115,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
112
115
  var matched = toString(result[0]);
113
116
  var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
114
117
  var captures = [];
118
+ var replacement;
115
119
  // NOTE: This is equivalent to
116
120
  // captures = result.slice(1).map(maybeToString)
117
121
  // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
@@ -122,7 +126,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
122
126
  if (functionalReplace) {
123
127
  var replacerArgs = concat([matched], captures, position, S);
124
128
  if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
125
- var replacement = toString(apply(replaceValue, undefined, replacerArgs));
129
+ replacement = toString(apply(replaceValue, undefined, replacerArgs));
126
130
  } else {
127
131
  replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
128
132
  }
@@ -131,6 +135,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
131
135
  nextSourcePosition = position + matched.length;
132
136
  }
133
137
  }
138
+
134
139
  return accumulatedResult + stringSlice(S, nextSourcePosition);
135
140
  }
136
141
  ];
@@ -41,11 +41,11 @@ var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
41
41
  fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
42
42
  var internalSplit;
43
43
  if (
44
- 'abbc'.split(/(b)*/)[1] == 'c' ||
44
+ 'abbc'.split(/(b)*/)[1] === 'c' ||
45
45
  // eslint-disable-next-line regexp/no-empty-group -- required for testing
46
- 'test'.split(/(?:)/, -1).length != 4 ||
47
- 'ab'.split(/(?:ab)*/).length != 2 ||
48
- '.'.split(/(.?)(.?)/).length != 4 ||
46
+ 'test'.split(/(?:)/, -1).length !== 4 ||
47
+ 'ab'.split(/(?:ab)*/).length !== 2 ||
48
+ '.'.split(/(.?)(.?)/).length !== 4 ||
49
49
  // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
50
50
  '.'.split(/()()/).length > 1 ||
51
51
  ''.split(/.?/).length
@@ -30,9 +30,9 @@ $({ target: 'String', proto: true, forced: TO_STRING_CONVERSION_BUG }, {
30
30
  for (var i = 0; i < length; i++) {
31
31
  var charCode = charCodeAt(S, i);
32
32
  // single UTF-16 code unit
33
- if ((charCode & 0xF800) != 0xD800) result[i] = charAt(S, i);
33
+ if ((charCode & 0xF800) !== 0xD800) result[i] = charAt(S, i);
34
34
  // unpaired surrogate
35
- else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) != 0xDC00) result[i] = REPLACEMENT_CHARACTER;
35
+ else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = REPLACEMENT_CHARACTER;
36
36
  // surrogate pair
37
37
  else {
38
38
  result[i] = charAt(S, i);
@@ -66,7 +66,7 @@ var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChil
66
66
  var setSymbolDescriptor = DESCRIPTORS && fails(function () {
67
67
  return nativeObjectCreate(nativeDefineProperty({}, 'a', {
68
68
  get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
69
- })).a != 7;
69
+ })).a !== 7;
70
70
  }) ? function (O, P, Attributes) {
71
71
  var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
72
72
  if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
@@ -35,7 +35,7 @@ if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototy
35
35
  SymbolWrapper.prototype = SymbolPrototype;
36
36
  SymbolPrototype.constructor = SymbolWrapper;
37
37
 
38
- var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
38
+ var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
39
39
  var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
40
40
  var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
41
41
  var regexp = /^Symbol\((.*)\)[^)]+$/;
@@ -16,7 +16,7 @@ var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
16
16
  });
17
17
 
18
18
  var FORCED = fails(function () {
19
- return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
19
+ return [1, 2].toLocaleString() !== new Int8Array([1, 2]).toLocaleString();
20
20
  }) || !fails(function () {
21
21
  Int8Array.prototype.toLocaleString.call([1, 2]);
22
22
  });
@@ -15,7 +15,7 @@ if (fails(function () { arrayToString.call({}); })) {
15
15
  };
16
16
  }
17
17
 
18
- var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
18
+ var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString !== arrayToString;
19
19
 
20
20
  // `%TypedArray%.prototype.toString` method
21
21
  // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring