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.
- package/README.md +8 -8
- package/actual/iterator/concat.js +21 -0
- package/actual/iterator/index.js +1 -0
- package/actual/map/get-or-insert-computed.js +6 -0
- package/actual/map/get-or-insert.js +6 -0
- package/actual/map/index.js +2 -0
- package/actual/math/index.js +0 -1
- package/actual/math/sum-precise.js +2 -3
- package/actual/typed-array/from-base64.js +3 -0
- package/actual/typed-array/from-hex.js +3 -0
- package/actual/typed-array/index.js +1 -1
- package/actual/typed-array/set-from-base64.js +3 -0
- package/actual/typed-array/set-from-hex.js +3 -0
- package/actual/typed-array/to-base64.js +3 -0
- package/actual/typed-array/to-hex.js +3 -0
- package/actual/weak-map/get-or-insert-computed.js +6 -0
- package/actual/weak-map/get-or-insert.js +6 -0
- package/actual/weak-map/index.js +2 -0
- package/es/index.js +7 -0
- package/es/math/index.js +2 -0
- package/es/math/sum-precise.js +6 -0
- package/es/typed-array/from-base64.js +2 -0
- package/es/typed-array/from-hex.js +2 -0
- package/es/typed-array/methods.js +6 -0
- package/es/typed-array/set-from-base64.js +2 -0
- package/es/typed-array/set-from-hex.js +2 -0
- package/es/typed-array/to-base64.js +2 -0
- package/es/typed-array/to-hex.js +2 -0
- package/full/index.js +7 -0
- package/full/iterator/concat.js +3 -19
- package/full/iterator/from.js +1 -0
- package/full/iterator/index.js +0 -1
- package/full/iterator/range.js +1 -0
- package/full/iterator/zip-keyed.js +1 -0
- package/full/iterator/zip.js +1 -0
- package/full/map/get-or-insert-computed.js +2 -4
- package/full/map/get-or-insert.js +2 -4
- package/full/weak-map/get-or-insert-computed.js +2 -4
- package/full/weak-map/get-or-insert.js +2 -4
- package/internals/shared-store.js +2 -2
- package/internals/uint8-from-base64.js +6 -5
- package/modules/es.math.sum-precise.js +151 -0
- package/modules/es.uint8-array.from-base64.js +29 -0
- package/modules/es.uint8-array.from-hex.js +13 -0
- package/modules/es.uint8-array.set-from-base64.js +37 -0
- package/modules/es.uint8-array.set-from-hex.js +19 -0
- package/modules/es.uint8-array.to-base64.js +60 -0
- package/modules/es.uint8-array.to-hex.js +34 -0
- package/modules/esnext.iterator.concat.js +1 -1
- package/modules/esnext.map.get-or-insert-computed.js +2 -1
- package/modules/esnext.map.get-or-insert.js +2 -1
- package/modules/esnext.math.sum-precise.js +2 -150
- package/modules/esnext.uint8-array.from-base64.js +2 -23
- package/modules/esnext.uint8-array.from-hex.js +2 -12
- package/modules/esnext.uint8-array.set-from-base64.js +2 -31
- package/modules/esnext.uint8-array.set-from-hex.js +2 -18
- package/modules/esnext.uint8-array.to-base64.js +2 -59
- package/modules/esnext.uint8-array.to-hex.js +2 -33
- package/modules/esnext.weak-map.get-or-insert-computed.js +2 -1
- package/modules/esnext.weak-map.get-or-insert.js +2 -1
- package/package.json +4 -1
- package/stable/index.js +7 -0
- package/stable/math/sum-precise.js +4 -0
- package/stable/typed-array/from-base64.js +4 -0
- package/stable/typed-array/from-hex.js +4 -0
- package/stable/typed-array/set-from-base64.js +4 -0
- package/stable/typed-array/set-from-hex.js +4 -0
- package/stable/typed-array/to-base64.js +4 -0
- package/stable/typed-array/to-hex.js +4 -0
- package/stage/2.7.js +1 -2
- package/stage/2.js +0 -1
- package/stage/3.js +2 -2
- package/stage/4.js +2 -0
|
@@ -1,60 +1,3 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
3
|
-
|
|
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:
|
|
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:
|
|
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.
|
|
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');
|
package/stage/2.7.js
CHANGED
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/
|
|
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');
|