core-js 3.44.0 → 3.45.1

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 (73) hide show
  1. package/README.md +8 -8
  2. package/actual/iterator/concat.js +21 -0
  3. package/actual/iterator/index.js +1 -0
  4. package/actual/map/get-or-insert-computed.js +6 -0
  5. package/actual/map/get-or-insert.js +6 -0
  6. package/actual/map/index.js +2 -0
  7. package/actual/math/index.js +0 -1
  8. package/actual/math/sum-precise.js +2 -3
  9. package/actual/typed-array/from-base64.js +3 -0
  10. package/actual/typed-array/from-hex.js +3 -0
  11. package/actual/typed-array/index.js +1 -1
  12. package/actual/typed-array/set-from-base64.js +3 -0
  13. package/actual/typed-array/set-from-hex.js +3 -0
  14. package/actual/typed-array/to-base64.js +3 -0
  15. package/actual/typed-array/to-hex.js +3 -0
  16. package/actual/weak-map/get-or-insert-computed.js +6 -0
  17. package/actual/weak-map/get-or-insert.js +6 -0
  18. package/actual/weak-map/index.js +2 -0
  19. package/es/index.js +7 -0
  20. package/es/math/index.js +2 -0
  21. package/es/math/sum-precise.js +6 -0
  22. package/es/typed-array/from-base64.js +2 -0
  23. package/es/typed-array/from-hex.js +2 -0
  24. package/es/typed-array/methods.js +6 -0
  25. package/es/typed-array/set-from-base64.js +2 -0
  26. package/es/typed-array/set-from-hex.js +2 -0
  27. package/es/typed-array/to-base64.js +2 -0
  28. package/es/typed-array/to-hex.js +2 -0
  29. package/full/index.js +7 -0
  30. package/full/iterator/concat.js +3 -19
  31. package/full/iterator/from.js +1 -0
  32. package/full/iterator/index.js +0 -1
  33. package/full/iterator/range.js +1 -0
  34. package/full/iterator/zip-keyed.js +1 -0
  35. package/full/iterator/zip.js +1 -0
  36. package/full/map/get-or-insert-computed.js +2 -4
  37. package/full/map/get-or-insert.js +2 -4
  38. package/full/weak-map/get-or-insert-computed.js +2 -4
  39. package/full/weak-map/get-or-insert.js +2 -4
  40. package/internals/shared-store.js +2 -2
  41. package/internals/uint8-from-base64.js +6 -5
  42. package/modules/es.math.sum-precise.js +151 -0
  43. package/modules/es.uint8-array.from-base64.js +29 -0
  44. package/modules/es.uint8-array.from-hex.js +13 -0
  45. package/modules/es.uint8-array.set-from-base64.js +37 -0
  46. package/modules/es.uint8-array.set-from-hex.js +19 -0
  47. package/modules/es.uint8-array.to-base64.js +60 -0
  48. package/modules/es.uint8-array.to-hex.js +34 -0
  49. package/modules/esnext.iterator.concat.js +1 -1
  50. package/modules/esnext.map.get-or-insert-computed.js +2 -1
  51. package/modules/esnext.map.get-or-insert.js +2 -1
  52. package/modules/esnext.math.sum-precise.js +2 -150
  53. package/modules/esnext.uint8-array.from-base64.js +2 -23
  54. package/modules/esnext.uint8-array.from-hex.js +2 -12
  55. package/modules/esnext.uint8-array.set-from-base64.js +2 -31
  56. package/modules/esnext.uint8-array.set-from-hex.js +2 -18
  57. package/modules/esnext.uint8-array.to-base64.js +2 -59
  58. package/modules/esnext.uint8-array.to-hex.js +2 -33
  59. package/modules/esnext.weak-map.get-or-insert-computed.js +2 -1
  60. package/modules/esnext.weak-map.get-or-insert.js +2 -1
  61. package/package.json +4 -1
  62. package/stable/index.js +7 -0
  63. package/stable/math/sum-precise.js +4 -0
  64. package/stable/typed-array/from-base64.js +4 -0
  65. package/stable/typed-array/from-hex.js +4 -0
  66. package/stable/typed-array/set-from-base64.js +4 -0
  67. package/stable/typed-array/set-from-hex.js +4 -0
  68. package/stable/typed-array/to-base64.js +4 -0
  69. package/stable/typed-array/to-hex.js +4 -0
  70. package/stage/2.7.js +1 -2
  71. package/stage/2.js +0 -1
  72. package/stage/3.js +2 -2
  73. package/stage/4.js +2 -0
@@ -1,60 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var globalThis = require('../internals/global-this');
4
- var uncurryThis = require('../internals/function-uncurry-this');
5
- var anObjectOrUndefined = require('../internals/an-object-or-undefined');
6
- var anUint8Array = require('../internals/an-uint8-array');
7
- var notDetached = require('../internals/array-buffer-not-detached');
8
- var base64Map = require('../internals/base64-map');
9
- var getAlphabetOption = require('../internals/get-alphabet-option');
10
-
11
- var base64Alphabet = base64Map.i2c;
12
- var base64UrlAlphabet = base64Map.i2cUrl;
13
-
14
- var charAt = uncurryThis(''.charAt);
15
-
16
- var Uint8Array = globalThis.Uint8Array;
17
-
18
- var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toBase64 || !function () {
19
- try {
20
- var target = new Uint8Array();
21
- target.toBase64(null);
22
- } catch (error) {
23
- return true;
24
- }
25
- }();
26
-
27
- // `Uint8Array.prototype.toBase64` method
28
- // https://github.com/tc39/proposal-arraybuffer-base64
29
- if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
30
- toBase64: function toBase64(/* options */) {
31
- var array = anUint8Array(this);
32
- var options = arguments.length ? anObjectOrUndefined(arguments[0]) : undefined;
33
- var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;
34
- var omitPadding = !!options && !!options.omitPadding;
35
- notDetached(this.buffer);
36
-
37
- var result = '';
38
- var i = 0;
39
- var length = array.length;
40
- var triplet;
41
-
42
- var at = function (shift) {
43
- return charAt(alphabet, (triplet >> (6 * shift)) & 63);
44
- };
45
-
46
- for (; i + 2 < length; i += 3) {
47
- triplet = (array[i] << 16) + (array[i + 1] << 8) + array[i + 2];
48
- result += at(3) + at(2) + at(1) + at(0);
49
- }
50
- if (i + 2 === length) {
51
- triplet = (array[i] << 16) + (array[i + 1] << 8);
52
- result += at(3) + at(2) + at(1) + (omitPadding ? '' : '=');
53
- } else if (i + 1 === length) {
54
- triplet = array[i] << 16;
55
- result += at(3) + at(2) + (omitPadding ? '' : '==');
56
- }
57
-
58
- return result;
59
- }
60
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.uint8-array.to-base64');
@@ -1,34 +1,3 @@
1
1
  'use strict';
2
- var $ = require('../internals/export');
3
- var globalThis = require('../internals/global-this');
4
- var uncurryThis = require('../internals/function-uncurry-this');
5
- var anUint8Array = require('../internals/an-uint8-array');
6
- var notDetached = require('../internals/array-buffer-not-detached');
7
-
8
- var numberToString = uncurryThis(1.1.toString);
9
-
10
- var Uint8Array = globalThis.Uint8Array;
11
-
12
- var INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS = !Uint8Array || !Uint8Array.prototype.toHex || !(function () {
13
- try {
14
- var target = new Uint8Array([255, 255, 255, 255, 255, 255, 255, 255]);
15
- return target.toHex() === 'ffffffffffffffff';
16
- } catch (error) {
17
- return false;
18
- }
19
- })();
20
-
21
- // `Uint8Array.prototype.toHex` method
22
- // https://github.com/tc39/proposal-arraybuffer-base64
23
- if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: INCORRECT_BEHAVIOR_OR_DOESNT_EXISTS }, {
24
- toHex: function toHex() {
25
- anUint8Array(this);
26
- notDetached(this.buffer);
27
- var result = '';
28
- for (var i = 0, length = this.length; i < length; i++) {
29
- var hex = numberToString(this[i], 16);
30
- result += hex.length === 1 ? '0' + hex : hex;
31
- }
32
- return result;
33
- }
34
- });
2
+ // TODO: Remove from `core-js@4`
3
+ require('../modules/es.uint8-array.to-hex');
@@ -4,6 +4,7 @@ var aCallable = require('../internals/a-callable');
4
4
  var aWeakMap = require('../internals/a-weak-map');
5
5
  var aWeakKey = require('../internals/a-weak-key');
6
6
  var WeakMapHelpers = require('../internals/weak-map-helpers');
7
+ var IS_PURE = require('../internals/is-pure');
7
8
 
8
9
  var get = WeakMapHelpers.get;
9
10
  var has = WeakMapHelpers.has;
@@ -11,7 +12,7 @@ var set = WeakMapHelpers.set;
11
12
 
12
13
  // `WeakMap.prototype.getOrInsertComputed` method
13
14
  // https://github.com/tc39/proposal-upsert
14
- $({ target: 'WeakMap', proto: true, real: true, forced: true }, {
15
+ $({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {
15
16
  getOrInsertComputed: function getOrInsertComputed(key, callbackfn) {
16
17
  aWeakMap(this);
17
18
  aWeakKey(key);
@@ -2,6 +2,7 @@
2
2
  var $ = require('../internals/export');
3
3
  var aWeakMap = require('../internals/a-weak-map');
4
4
  var WeakMapHelpers = require('../internals/weak-map-helpers');
5
+ var IS_PURE = require('../internals/is-pure');
5
6
 
6
7
  var get = WeakMapHelpers.get;
7
8
  var has = WeakMapHelpers.has;
@@ -9,7 +10,7 @@ var set = WeakMapHelpers.set;
9
10
 
10
11
  // `WeakMap.prototype.getOrInsert` method
11
12
  // https://github.com/tc39/proposal-upsert
12
- $({ target: 'WeakMap', proto: true, real: true, forced: true }, {
13
+ $({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {
13
14
  getOrInsert: function getOrInsert(key, value) {
14
15
  if (has(aWeakMap(this), key)) return get(this, key);
15
16
  set(this, key, value);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-js",
3
- "version": "3.44.0",
3
+ "version": "3.45.1",
4
4
  "type": "commonjs",
5
5
  "description": "Standard library",
6
6
  "keywords": [
@@ -56,6 +56,9 @@
56
56
  "url": "git+https://github.com/zloirock/core-js.git",
57
57
  "directory": "packages/core-js"
58
58
  },
59
+ "bugs": {
60
+ "url": "https://github.com/zloirock/core-js/issues"
61
+ },
59
62
  "funding": {
60
63
  "type": "opencollective",
61
64
  "url": "https://opencollective.com/core-js"
package/stable/index.js CHANGED
@@ -117,6 +117,7 @@ require('../modules/es.math.log1p');
117
117
  require('../modules/es.math.log2');
118
118
  require('../modules/es.math.sign');
119
119
  require('../modules/es.math.sinh');
120
+ require('../modules/es.math.sum-precise');
120
121
  require('../modules/es.math.tanh');
121
122
  require('../modules/es.math.to-string-tag');
122
123
  require('../modules/es.math.trunc');
@@ -278,6 +279,12 @@ require('../modules/es.typed-array.to-reversed');
278
279
  require('../modules/es.typed-array.to-sorted');
279
280
  require('../modules/es.typed-array.to-string');
280
281
  require('../modules/es.typed-array.with');
282
+ require('../modules/es.uint8-array.from-base64');
283
+ require('../modules/es.uint8-array.from-hex');
284
+ require('../modules/es.uint8-array.set-from-base64');
285
+ require('../modules/es.uint8-array.set-from-hex');
286
+ require('../modules/es.uint8-array.to-base64');
287
+ require('../modules/es.uint8-array.to-hex');
281
288
  require('../modules/es.unescape');
282
289
  require('../modules/es.weak-map');
283
290
  require('../modules/es.weak-set');
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/math/sum-precise');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/typed-array/from-base64');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/typed-array/from-hex');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/typed-array/set-from-base64');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/typed-array/set-from-hex');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/typed-array/to-base64');
3
+
4
+ module.exports = parent;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+ var parent = require('../../es/typed-array/to-hex');
3
+
4
+ module.exports = parent;
package/stage/2.7.js CHANGED
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
  var parent = require('./3');
3
3
 
4
- require('../proposals/iterator-sequencing');
5
- require('../proposals/map-upsert-v4');
4
+ require('../proposals/joint-iteration');
6
5
 
7
6
  module.exports = parent;
package/stage/2.js CHANGED
@@ -14,7 +14,6 @@ require('../proposals/async-explicit-resource-management');
14
14
  require('../proposals/decorators');
15
15
  require('../proposals/decorator-metadata');
16
16
  require('../proposals/iterator-helpers');
17
- require('../proposals/joint-iteration');
18
17
  require('../proposals/map-upsert-stage-2');
19
18
  require('../proposals/math-clamp-v2');
20
19
  require('../proposals/set-methods');
package/stage/3.js CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
  var parent = require('./4');
3
3
 
4
- require('../proposals/array-buffer-base64');
5
4
  require('../proposals/decorator-metadata-v2');
5
+ require('../proposals/iterator-sequencing');
6
6
  require('../proposals/json-parse-with-source');
7
- require('../proposals/math-sum');
7
+ require('../proposals/map-upsert-v4');
8
8
  // TODO: Obsolete versions, remove from `core-js@4`
9
9
  require('../proposals/array-grouping-stage-3');
10
10
  require('../proposals/array-grouping-stage-3-2');
package/stage/4.js CHANGED
@@ -1,6 +1,7 @@
1
1
  'use strict';
2
2
  // TODO: Remove this entry from `core-js@4`
3
3
  require('../proposals/accessible-object-hasownproperty');
4
+ require('../proposals/array-buffer-base64');
4
5
  require('../proposals/array-buffer-transfer');
5
6
  require('../proposals/array-find-from-last');
6
7
  require('../proposals/array-from-async-stage-2');
@@ -12,6 +13,7 @@ require('../proposals/float16');
12
13
  require('../proposals/global-this');
13
14
  require('../proposals/is-error');
14
15
  require('../proposals/iterator-helpers-stage-3-2');
16
+ require('../proposals/math-sum');
15
17
  require('../proposals/promise-all-settled');
16
18
  require('../proposals/promise-any');
17
19
  require('../proposals/promise-try');