core-js 3.22.5 → 3.22.8

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 (105) hide show
  1. package/actual/typed-array/at.js +1 -1
  2. package/full/typed-array/at.js +1 -1
  3. package/internals/a-callable.js +2 -3
  4. package/internals/a-constructor.js +2 -3
  5. package/internals/a-possible-prototype.js +3 -4
  6. package/internals/add-to-unscopables.js +2 -2
  7. package/internals/an-instance.js +2 -3
  8. package/internals/an-object.js +3 -4
  9. package/internals/array-copy-within.js +2 -1
  10. package/internals/array-from.js +3 -4
  11. package/internals/array-group-by.js +2 -3
  12. package/internals/array-reduce.js +2 -3
  13. package/internals/array-slice-simple.js +2 -3
  14. package/internals/array-species-constructor.js +3 -4
  15. package/internals/array-to-spliced.js +2 -4
  16. package/internals/array-with.js +2 -3
  17. package/internals/async-iterator-iteration.js +2 -7
  18. package/internals/classof.js +2 -3
  19. package/internals/composite-key.js +3 -4
  20. package/internals/date-to-iso-string.js +2 -3
  21. package/internals/date-to-primitive.js +2 -3
  22. package/internals/define-built-in.js +12 -17
  23. package/internals/{set-global.js → define-global-property.js} +0 -0
  24. package/internals/delete-property-or-throw.js +8 -0
  25. package/internals/does-not-exceed-safe-integer.js +7 -0
  26. package/internals/export.js +16 -16
  27. package/internals/flatten-into-array.js +2 -4
  28. package/internals/function-bind.js +3 -4
  29. package/internals/get-iterator.js +2 -3
  30. package/internals/ieee754.js +2 -4
  31. package/internals/indexed-object.js +4 -5
  32. package/internals/is-iterable.js +2 -3
  33. package/internals/is-symbol.js +2 -3
  34. package/internals/iterate.js +2 -3
  35. package/internals/make-built-in.js +6 -5
  36. package/internals/map-upsert.js +2 -3
  37. package/internals/math-expm1.js +2 -1
  38. package/internals/math-fround.js +3 -2
  39. package/internals/math-log1p.js +2 -1
  40. package/internals/math-sign.js +2 -1
  41. package/internals/math-trunc.js +10 -0
  42. package/internals/not-a-regexp.js +2 -3
  43. package/internals/numeric-range-iterator.js +7 -8
  44. package/internals/object-define-property.js +2 -3
  45. package/internals/object-get-prototype-of.js +5 -5
  46. package/internals/ordinary-to-primitive.js +2 -3
  47. package/internals/regexp-exec-abstract.js +2 -3
  48. package/internals/require-object-coercible.js +2 -4
  49. package/internals/shared-store.js +2 -2
  50. package/internals/shared.js +2 -2
  51. package/internals/string-punycode-to-ascii.js +3 -4
  52. package/internals/string-repeat.js +2 -3
  53. package/internals/to-big-int.js +12 -0
  54. package/internals/to-index.js +2 -3
  55. package/internals/to-integer-or-infinity.js +3 -4
  56. package/internals/to-object.js +2 -3
  57. package/internals/to-offset.js +2 -3
  58. package/internals/to-positive-integer.js +2 -3
  59. package/internals/to-primitive.js +2 -3
  60. package/internals/to-string.js +2 -3
  61. package/internals/try-to-string.js +2 -4
  62. package/internals/validate-arguments-length.js +2 -4
  63. package/modules/es.aggregate-error.constructor.js +5 -6
  64. package/modules/es.array.concat.js +3 -6
  65. package/modules/es.array.of.js +4 -4
  66. package/modules/es.array.slice.js +4 -5
  67. package/modules/es.array.sort.js +2 -1
  68. package/modules/es.array.splice.js +7 -11
  69. package/modules/es.date.now.js +3 -4
  70. package/modules/es.math.acosh.js +4 -3
  71. package/modules/es.math.asinh.js +2 -1
  72. package/modules/es.math.atanh.js +2 -1
  73. package/modules/es.math.cbrt.js +2 -1
  74. package/modules/es.math.clz32.js +2 -1
  75. package/modules/es.math.sinh.js +2 -1
  76. package/modules/es.math.tanh.js +4 -3
  77. package/modules/es.math.trunc.js +2 -6
  78. package/modules/es.number.to-exponential.js +7 -8
  79. package/modules/es.number.to-fixed.js +5 -6
  80. package/modules/es.regexp.dot-all.js +2 -3
  81. package/modules/es.regexp.sticky.js +2 -3
  82. package/modules/es.regexp.test.js +2 -3
  83. package/modules/es.string.from-code-point.js +2 -3
  84. package/modules/es.string.match-all.js +2 -3
  85. package/modules/es.string.replace-all.js +2 -3
  86. package/modules/es.typed-array.fill.js +18 -9
  87. package/modules/esnext.array.to-reversed.js +2 -3
  88. package/modules/esnext.array.to-sorted.js +2 -3
  89. package/modules/esnext.array.to-spliced.js +2 -3
  90. package/modules/esnext.array.with.js +2 -3
  91. package/modules/esnext.async-iterator.reduce.js +2 -3
  92. package/modules/esnext.composite-key.js +2 -3
  93. package/modules/esnext.iterator.flat-map.js +2 -3
  94. package/modules/esnext.iterator.reduce.js +2 -3
  95. package/modules/esnext.map.reduce.js +2 -3
  96. package/modules/esnext.map.update.js +2 -3
  97. package/modules/esnext.math.seeded-prng.js +2 -3
  98. package/modules/esnext.math.signbit.js +3 -1
  99. package/modules/esnext.number.from-string.js +8 -9
  100. package/modules/esnext.set.reduce.js +2 -3
  101. package/modules/esnext.string.cooked.js +2 -3
  102. package/modules/esnext.typed-array.with.js +9 -0
  103. package/modules/web.queue-microtask.js +1 -1
  104. package/modules/web.url-search-params.constructor.js +2 -2
  105. package/package.json +1 -1
@@ -1,11 +1,10 @@
1
1
  var $ = require('../internals/export');
2
- var global = require('../internals/global');
3
2
  var apply = require('../internals/function-apply');
4
3
  var getCompositeKeyNode = require('../internals/composite-key');
5
4
  var getBuiltIn = require('../internals/get-built-in');
6
5
  var create = require('../internals/object-create');
7
6
 
8
- var Object = global.Object;
7
+ var $Object = Object;
9
8
 
10
9
  var initializer = function () {
11
10
  var freeze = getBuiltIn('Object', 'freeze');
@@ -15,6 +14,6 @@ var initializer = function () {
15
14
  // https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
16
15
  $({ global: true, forced: true }, {
17
16
  compositeKey: function compositeKey() {
18
- return apply(getCompositeKeyNode, Object, arguments).get('object', initializer);
17
+ return apply(getCompositeKeyNode, $Object, arguments).get('object', initializer);
19
18
  }
20
19
  });
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
  // https://github.com/tc39/proposal-iterator-helpers
3
3
  var $ = require('../internals/export');
4
- var global = require('../internals/global');
5
4
  var call = require('../internals/function-call');
6
5
  var aCallable = require('../internals/a-callable');
7
6
  var anObject = require('../internals/an-object');
@@ -9,7 +8,7 @@ var getIteratorMethod = require('../internals/get-iterator-method');
9
8
  var createIteratorProxy = require('../internals/iterator-create-proxy');
10
9
  var iteratorClose = require('../internals/iterator-close');
11
10
 
12
- var TypeError = global.TypeError;
11
+ var $TypeError = TypeError;
13
12
 
14
13
  var IteratorProxy = createIteratorProxy(function () {
15
14
  var iterator = this.iterator;
@@ -32,7 +31,7 @@ var IteratorProxy = createIteratorProxy(function () {
32
31
  iteratorMethod = getIteratorMethod(mapped);
33
32
 
34
33
  if (!iteratorMethod) {
35
- throw TypeError('.flatMap callback should return an iterable object');
34
+ throw $TypeError('.flatMap callback should return an iterable object');
36
35
  }
37
36
 
38
37
  this.innerIterator = innerIterator = anObject(call(iteratorMethod, mapped));
@@ -1,12 +1,11 @@
1
1
  'use strict';
2
2
  // https://github.com/tc39/proposal-iterator-helpers
3
3
  var $ = require('../internals/export');
4
- var global = require('../internals/global');
5
4
  var iterate = require('../internals/iterate');
6
5
  var aCallable = require('../internals/a-callable');
7
6
  var anObject = require('../internals/an-object');
8
7
 
9
- var TypeError = global.TypeError;
8
+ var $TypeError = TypeError;
10
9
 
11
10
  $({ target: 'Iterator', proto: true, real: true, forced: true }, {
12
11
  reduce: function reduce(reducer /* , initialValue */) {
@@ -22,7 +21,7 @@ $({ target: 'Iterator', proto: true, real: true, forced: true }, {
22
21
  accumulator = reducer(accumulator, value);
23
22
  }
24
23
  }, { IS_ITERATOR: true });
25
- if (noInitial) throw TypeError('Reduce of empty iterator with no initial value');
24
+ if (noInitial) throw $TypeError('Reduce of empty iterator with no initial value');
26
25
  return accumulator;
27
26
  }
28
27
  });
@@ -1,12 +1,11 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
- var global = require('../internals/global');
4
3
  var anObject = require('../internals/an-object');
5
4
  var aCallable = require('../internals/a-callable');
6
5
  var getMapIterator = require('../internals/get-map-iterator');
7
6
  var iterate = require('../internals/iterate');
8
7
 
9
- var TypeError = global.TypeError;
8
+ var $TypeError = TypeError;
10
9
 
11
10
  // `Map.prototype.reduce` method
12
11
  // https://github.com/tc39/proposal-collection-methods
@@ -25,7 +24,7 @@ $({ target: 'Map', proto: true, real: true, forced: true }, {
25
24
  accumulator = callbackfn(accumulator, value, key, map);
26
25
  }
27
26
  }, { AS_ENTRIES: true, IS_ITERATOR: true });
28
- if (noInitial) throw TypeError('Reduce of empty map with no initial value');
27
+ if (noInitial) throw $TypeError('Reduce of empty map with no initial value');
29
28
  return accumulator;
30
29
  }
31
30
  });
@@ -1,11 +1,10 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
- var global = require('../internals/global');
4
3
  var call = require('../internals/function-call');
5
4
  var anObject = require('../internals/an-object');
6
5
  var aCallable = require('../internals/a-callable');
7
6
 
8
- var TypeError = global.TypeError;
7
+ var $TypeError = TypeError;
9
8
 
10
9
  // `Set.prototype.update` method
11
10
  // https://github.com/tc39/proposal-collection-methods
@@ -19,7 +18,7 @@ $({ target: 'Map', proto: true, real: true, forced: true }, {
19
18
  aCallable(callback);
20
19
  var isPresentInMap = call(has, map, key);
21
20
  if (!isPresentInMap && length < 3) {
22
- throw TypeError('Updating absent value');
21
+ throw $TypeError('Updating absent value');
23
22
  }
24
23
  var value = isPresentInMap ? call(get, map, key) : aCallable(length > 2 ? arguments[2] : undefined)(key, map);
25
24
  call(set, map, key, callback(value, key, map));
@@ -1,5 +1,4 @@
1
1
  var $ = require('../internals/export');
2
- var global = require('../internals/global');
3
2
  var anObject = require('../internals/an-object');
4
3
  var numberIsFinite = require('../internals/number-is-finite');
5
4
  var createIteratorConstructor = require('../internals/create-iterator-constructor');
@@ -10,7 +9,7 @@ var SEEDED_RANDOM_GENERATOR = SEEDED_RANDOM + ' Generator';
10
9
  var SEED_TYPE_ERROR = 'Math.seededPRNG() argument should have a "seed" field with a finite value.';
11
10
  var setInternalState = InternalStateModule.set;
12
11
  var getInternalState = InternalStateModule.getterFor(SEEDED_RANDOM_GENERATOR);
13
- var TypeError = global.TypeError;
12
+ var $TypeError = TypeError;
14
13
 
15
14
  var $SeededRandomGenerator = createIteratorConstructor(function SeededRandomGenerator(seed) {
16
15
  setInternalState(this, {
@@ -29,7 +28,7 @@ var $SeededRandomGenerator = createIteratorConstructor(function SeededRandomGene
29
28
  $({ target: 'Math', stat: true, forced: true }, {
30
29
  seededPRNG: function seededPRNG(it) {
31
30
  var seed = anObject(it).seed;
32
- if (!numberIsFinite(seed)) throw TypeError(SEED_TYPE_ERROR);
31
+ if (!numberIsFinite(seed)) throw $TypeError(SEED_TYPE_ERROR);
33
32
  return new $SeededRandomGenerator(seed);
34
33
  }
35
34
  });
@@ -4,6 +4,8 @@ var $ = require('../internals/export');
4
4
  // https://github.com/tc39/proposal-Math.signbit
5
5
  $({ target: 'Math', stat: true, forced: true }, {
6
6
  signbit: function signbit(x) {
7
- return (x = +x) == x && x == 0 ? 1 / x == -Infinity : x < 0;
7
+ var n = +x;
8
+ // eslint-disable-next-line no-self-compare -- NaN check
9
+ return n == n && n == 0 ? 1 / n == -Infinity : n < 0;
8
10
  }
9
11
  });
@@ -1,15 +1,14 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
- var global = require('../internals/global');
4
3
  var uncurryThis = require('../internals/function-uncurry-this');
5
4
  var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
6
5
  var parseInt = require('../internals/number-parse-int');
7
6
 
8
7
  var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation';
9
8
  var INVALID_RADIX = 'Invalid radix';
10
- var RangeError = global.RangeError;
11
- var SyntaxError = global.SyntaxError;
12
- var TypeError = global.TypeError;
9
+ var $RangeError = RangeError;
10
+ var $SyntaxError = SyntaxError;
11
+ var $TypeError = TypeError;
13
12
  var valid = /^[\da-z]+$/;
14
13
  var charAt = uncurryThis(''.charAt);
15
14
  var exec = uncurryThis(valid.exec);
@@ -22,17 +21,17 @@ $({ target: 'Number', stat: true, forced: true }, {
22
21
  fromString: function fromString(string, radix) {
23
22
  var sign = 1;
24
23
  var R, mathNum;
25
- if (typeof string != 'string') throw TypeError(INVALID_NUMBER_REPRESENTATION);
26
- if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
24
+ if (typeof string != 'string') throw $TypeError(INVALID_NUMBER_REPRESENTATION);
25
+ if (!string.length) throw $SyntaxError(INVALID_NUMBER_REPRESENTATION);
27
26
  if (charAt(string, 0) == '-') {
28
27
  sign = -1;
29
28
  string = stringSlice(string, 1);
30
- if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
29
+ if (!string.length) throw $SyntaxError(INVALID_NUMBER_REPRESENTATION);
31
30
  }
32
31
  R = radix === undefined ? 10 : toIntegerOrInfinity(radix);
33
- if (R < 2 || R > 36) throw RangeError(INVALID_RADIX);
32
+ if (R < 2 || R > 36) throw $RangeError(INVALID_RADIX);
34
33
  if (!exec(valid, string) || numberToString(mathNum = parseInt(string, R), R) !== string) {
35
- throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
34
+ throw $SyntaxError(INVALID_NUMBER_REPRESENTATION);
36
35
  }
37
36
  return sign * mathNum;
38
37
  }
@@ -1,12 +1,11 @@
1
1
  'use strict';
2
2
  var $ = require('../internals/export');
3
- var global = require('../internals/global');
4
3
  var aCallable = require('../internals/a-callable');
5
4
  var anObject = require('../internals/an-object');
6
5
  var getSetIterator = require('../internals/get-set-iterator');
7
6
  var iterate = require('../internals/iterate');
8
7
 
9
- var TypeError = global.TypeError;
8
+ var $TypeError = TypeError;
10
9
 
11
10
  // `Set.prototype.reduce` method
12
11
  // https://github.com/tc39/proposal-collection-methods
@@ -25,7 +24,7 @@ $({ target: 'Set', proto: true, real: true, forced: true }, {
25
24
  accumulator = callbackfn(accumulator, value, value, set);
26
25
  }
27
26
  }, { IS_ITERATOR: true });
28
- if (noInitial) throw TypeError('Reduce of empty set with no initial value');
27
+ if (noInitial) throw $TypeError('Reduce of empty set with no initial value');
29
28
  return accumulator;
30
29
  }
31
30
  });
@@ -1,11 +1,10 @@
1
1
  var $ = require('../internals/export');
2
- var global = require('../internals/global');
3
2
  var uncurryThis = require('../internals/function-uncurry-this');
4
3
  var toIndexedObject = require('../internals/to-indexed-object');
5
4
  var toString = require('../internals/to-string');
6
5
  var lengthOfArrayLike = require('../internals/length-of-array-like');
7
6
 
8
- var TypeError = global.TypeError;
7
+ var $TypeError = TypeError;
9
8
  var ArrayPrototype = Array.prototype;
10
9
  var push = uncurryThis(ArrayPrototype.push);
11
10
  var join = uncurryThis(ArrayPrototype.join);
@@ -21,7 +20,7 @@ $({ target: 'String', stat: true, forced: true }, {
21
20
  var i = 0;
22
21
  while (literalSegments > i) {
23
22
  var nextVal = cookedTemplate[i++];
24
- if (nextVal === undefined) throw TypeError('Incorrect template');
23
+ if (nextVal === undefined) throw $TypeError('Incorrect template');
25
24
  push(elements, toString(nextVal));
26
25
  if (i === literalSegments) return join(elements, '');
27
26
  if (i < argumentsLength) push(elements, toString(arguments[i]));
@@ -1,13 +1,22 @@
1
1
  'use strict';
2
2
  var arrayWith = require('../internals/array-with');
3
3
  var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
4
+ // var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
5
+ // var toBigInt = require('../internals/to-big-int');
6
+ // var classof = require('../internals/classof');
7
+ // var uncurryThis = require('../internals/function-uncurry-this');
4
8
 
5
9
  var aTypedArray = ArrayBufferViewCore.aTypedArray;
6
10
  var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
7
11
  var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
12
+ // var slice = uncurryThis(''.slice);
8
13
 
9
14
  // `%TypedArray%.prototype.with` method
10
15
  // https://tc39.es/proposal-change-array-by-copy/#sec-%typedarray%.prototype.with
11
16
  exportTypedArrayMethod('with', { 'with': function (index, value) {
17
+ // aTypedArray(this);
18
+ // var relativeIndex = toIntegerOrInfinity(index);
19
+ // var actualValue = slice(classof(this), 0, 3) === 'Big' ? toBigInt(value) : +value;
20
+ // return arrayWith(this, this[TYPED_ARRAY_CONSTRUCTOR], relativeIndex, actualValue);
12
21
  return arrayWith(aTypedArray(this), this[TYPED_ARRAY_CONSTRUCTOR], index, value);
13
22
  } }['with']);
@@ -9,7 +9,7 @@ var process = global.process;
9
9
 
10
10
  // `queueMicrotask` method
11
11
  // https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
12
- $({ global: true, enumerable: true, noTargetGet: true }, {
12
+ $({ global: true, enumerable: true, dontCallGetSet: true }, {
13
13
  queueMicrotask: function queueMicrotask(fn) {
14
14
  validateArgumentsLength(arguments.length, 1);
15
15
  aCallable(fn);
@@ -364,7 +364,7 @@ if (!USE_NATIVE_URL && isCallable(Headers)) {
364
364
  };
365
365
 
366
366
  if (isCallable(nativeFetch)) {
367
- $({ global: true, enumerable: true, noTargetGet: true, forced: true }, {
367
+ $({ global: true, enumerable: true, dontCallGetSet: true, forced: true }, {
368
368
  fetch: function fetch(input /* , init */) {
369
369
  return nativeFetch(input, arguments.length > 1 ? wrapRequestOptions(arguments[1]) : {});
370
370
  }
@@ -380,7 +380,7 @@ if (!USE_NATIVE_URL && isCallable(Headers)) {
380
380
  RequestPrototype.constructor = RequestConstructor;
381
381
  RequestConstructor.prototype = RequestPrototype;
382
382
 
383
- $({ global: true, constructor: true, noTargetGet: true, forced: true }, {
383
+ $({ global: true, constructor: true, dontCallGetSet: true, forced: true }, {
384
384
  Request: RequestConstructor
385
385
  });
386
386
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "core-js",
3
3
  "description": "Standard library",
4
- "version": "3.22.5",
4
+ "version": "3.22.8",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git"