core-js 3.33.1 → 3.33.3

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.
@@ -1,3 +1,3 @@
1
1
  'use strict';
2
- /* global Bun -- Deno case */
2
+ /* global Bun -- Bun case */
3
3
  module.exports = typeof Bun == 'function' && Bun && typeof Bun.version == 'string';
@@ -10,7 +10,7 @@ var AsyncFromSyncIterator = require('../internals/async-from-sync-iterator');
10
10
 
11
11
  var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
12
12
 
13
- module.exports = function from(obj) {
13
+ module.exports = function (obj) {
14
14
  var object = anObject(obj);
15
15
  var alreadyAsync = true;
16
16
  var method = getMethod(object, ASYNC_ITERATOR);
@@ -2,5 +2,7 @@
2
2
  var global = require('../internals/global');
3
3
 
4
4
  module.exports = function (CONSTRUCTOR, METHOD) {
5
- return global[CONSTRUCTOR].prototype[METHOD];
5
+ var Constructor = global[CONSTRUCTOR];
6
+ var Prototype = Constructor && Constructor.prototype;
7
+ return Prototype && Prototype[METHOD];
6
8
  };
@@ -11,5 +11,6 @@ module.exports =
11
11
  // eslint-disable-next-line no-restricted-globals -- safe
12
12
  check(typeof self == 'object' && self) ||
13
13
  check(typeof global == 'object' && global) ||
14
+ check(typeof this == 'object' && this) ||
14
15
  // eslint-disable-next-line no-new-func -- fallback
15
- (function () { return this; })() || this || Function('return this')();
16
+ (function () { return this; })() || Function('return this')();
@@ -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.33.1',
8
+ version: '3.33.3',
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.33.1/LICENSE',
11
+ license: 'https://github.com/zloirock/core-js/blob/v3.33.3/LICENSE',
12
12
  source: 'https://github.com/zloirock/core-js'
13
13
  });
@@ -2,25 +2,26 @@
2
2
  var $ = require('../internals/export');
3
3
  var uncurryThis = require('../internals/function-uncurry-this');
4
4
  var toIntegerOrInfinity = require('../internals/to-integer-or-infinity');
5
- var parseInt = require('../internals/number-parse-int');
6
5
 
7
6
  var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation';
8
7
  var INVALID_RADIX = 'Invalid radix';
9
8
  var $RangeError = RangeError;
10
9
  var $SyntaxError = SyntaxError;
11
10
  var $TypeError = TypeError;
12
- var valid = /^[\da-z]+$/;
11
+ var $parseInt = parseInt;
12
+ var pow = Math.pow;
13
+ var valid = /^[\d.a-z]+$/;
13
14
  var charAt = uncurryThis(''.charAt);
14
15
  var exec = uncurryThis(valid.exec);
15
16
  var numberToString = uncurryThis(1.0.toString);
16
17
  var stringSlice = uncurryThis(''.slice);
18
+ var split = uncurryThis(''.split);
17
19
 
18
20
  // `Number.fromString` method
19
21
  // https://github.com/tc39/proposal-number-fromstring
20
22
  $({ target: 'Number', stat: true, forced: true }, {
21
23
  fromString: function fromString(string, radix) {
22
24
  var sign = 1;
23
- var R, mathNum;
24
25
  if (typeof string != 'string') throw new $TypeError(INVALID_NUMBER_REPRESENTATION);
25
26
  if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
26
27
  if (charAt(string, 0) === '-') {
@@ -28,11 +29,13 @@ $({ target: 'Number', stat: true, forced: true }, {
28
29
  string = stringSlice(string, 1);
29
30
  if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
30
31
  }
31
- R = radix === undefined ? 10 : toIntegerOrInfinity(radix);
32
+ var R = radix === undefined ? 10 : toIntegerOrInfinity(radix);
32
33
  if (R < 2 || R > 36) throw new $RangeError(INVALID_RADIX);
33
- if (!exec(valid, string) || numberToString(mathNum = parseInt(string, R), R) !== string) {
34
- throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
35
- }
34
+ if (!exec(valid, string)) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
35
+ var parts = split(string, '.');
36
+ var mathNum = $parseInt(parts[0], R);
37
+ if (parts.length > 1) mathNum += $parseInt(parts[1], R) / pow(R, parts[1].length);
38
+ if (numberToString(mathNum, R) !== string) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION);
36
39
  return sign * mathNum;
37
40
  }
38
41
  });
@@ -1,8 +1,6 @@
1
1
  'use strict';
2
2
  var FREEZING = require('../internals/freezing');
3
3
  var $ = require('../internals/export');
4
- var shared = require('../internals/shared');
5
- var getBuiltIn = require('../internals/get-built-in');
6
4
  var makeBuiltIn = require('../internals/make-built-in');
7
5
  var uncurryThis = require('../internals/function-uncurry-this');
8
6
  var apply = require('../internals/function-apply');
@@ -12,18 +10,15 @@ var isCallable = require('../internals/is-callable');
12
10
  var lengthOfArrayLike = require('../internals/length-of-array-like');
13
11
  var defineProperty = require('../internals/object-define-property').f;
14
12
  var createArrayFromList = require('../internals/array-slice-simple');
13
+ var WeakMapHelpers = require('../internals/weak-map-helpers');
15
14
  var cooked = require('../internals/string-cooked');
16
15
  var parse = require('../internals/string-parse');
17
16
  var whitespaces = require('../internals/whitespaces');
18
17
 
19
- var WeakMap = getBuiltIn('WeakMap');
20
- var globalDedentRegistry = shared('GlobalDedentRegistry', new WeakMap());
21
-
22
- /* eslint-disable no-self-assign -- prototype methods protection */
23
- globalDedentRegistry.has = globalDedentRegistry.has;
24
- globalDedentRegistry.get = globalDedentRegistry.get;
25
- globalDedentRegistry.set = globalDedentRegistry.set;
26
- /* eslint-enable no-self-assign -- prototype methods protection */
18
+ var DedentMap = new WeakMapHelpers.WeakMap();
19
+ var weakMapGet = WeakMapHelpers.get;
20
+ var weakMapHas = WeakMapHelpers.has;
21
+ var weakMapSet = WeakMapHelpers.set;
27
22
 
28
23
  var $Array = Array;
29
24
  var $TypeError = TypeError;
@@ -48,14 +43,14 @@ var dedentTemplateStringsArray = function (template) {
48
43
  var rawInput = template.raw;
49
44
  // https://github.com/tc39/proposal-string-dedent/issues/75
50
45
  if (FREEZING && !isFrozen(rawInput)) throw new $TypeError('Raw template should be frozen');
51
- if (globalDedentRegistry.has(rawInput)) return globalDedentRegistry.get(rawInput);
46
+ if (weakMapHas(DedentMap, rawInput)) return weakMapGet(DedentMap, rawInput);
52
47
  var raw = dedentStringsArray(rawInput);
53
48
  var cookedArr = cookStrings(raw);
54
49
  defineProperty(cookedArr, 'raw', {
55
50
  value: freeze(raw)
56
51
  });
57
52
  freeze(cookedArr);
58
- globalDedentRegistry.set(rawInput, cookedArr);
53
+ weakMapSet(DedentMap, rawInput, cookedArr);
59
54
  return cookedArr;
60
55
  };
61
56
 
@@ -2,7 +2,7 @@
2
2
  var IS_PURE = require('../internals/is-pure');
3
3
  var $ = require('../internals/export');
4
4
  var global = require('../internals/global');
5
- var getBuiltin = require('../internals/get-built-in');
5
+ var getBuiltIn = require('../internals/get-built-in');
6
6
  var uncurryThis = require('../internals/function-uncurry-this');
7
7
  var fails = require('../internals/fails');
8
8
  var uid = require('../internals/uid');
@@ -22,7 +22,8 @@ var validateArgumentsLength = require('../internals/validate-arguments-length');
22
22
  var getRegExpFlags = require('../internals/regexp-get-flags');
23
23
  var MapHelpers = require('../internals/map-helpers');
24
24
  var SetHelpers = require('../internals/set-helpers');
25
- var arrayBufferTransfer = require('../internals/array-buffer-transfer');
25
+ var setIterate = require('../internals/set-iterate');
26
+ var detachTransferable = require('../internals/detach-transferable');
26
27
  var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable');
27
28
  var PROPER_STRUCTURED_CLONE_TRANSFER = require('../internals/structured-clone-proper-transfer');
28
29
 
@@ -30,25 +31,17 @@ var Object = global.Object;
30
31
  var Array = global.Array;
31
32
  var Date = global.Date;
32
33
  var Error = global.Error;
33
- var EvalError = global.EvalError;
34
- var RangeError = global.RangeError;
35
- var ReferenceError = global.ReferenceError;
36
- var SyntaxError = global.SyntaxError;
37
34
  var TypeError = global.TypeError;
38
- var URIError = global.URIError;
39
35
  var PerformanceMark = global.PerformanceMark;
40
- var WebAssembly = global.WebAssembly;
41
- var CompileError = WebAssembly && WebAssembly.CompileError || Error;
42
- var LinkError = WebAssembly && WebAssembly.LinkError || Error;
43
- var RuntimeError = WebAssembly && WebAssembly.RuntimeError || Error;
44
- var DOMException = getBuiltin('DOMException');
36
+ var DOMException = getBuiltIn('DOMException');
45
37
  var Map = MapHelpers.Map;
46
38
  var mapHas = MapHelpers.has;
47
39
  var mapGet = MapHelpers.get;
48
40
  var mapSet = MapHelpers.set;
49
41
  var Set = SetHelpers.Set;
50
42
  var setAdd = SetHelpers.add;
51
- var objectKeys = getBuiltin('Object', 'keys');
43
+ var setHas = SetHelpers.has;
44
+ var objectKeys = getBuiltIn('Object', 'keys');
52
45
  var push = uncurryThis([].push);
53
46
  var thisBooleanValue = uncurryThis(true.valueOf);
54
47
  var thisNumberValue = uncurryThis(1.0.valueOf);
@@ -63,7 +56,7 @@ var checkBasicSemantic = function (structuredCloneImplementation) {
63
56
  var set1 = new global.Set([7]);
64
57
  var set2 = structuredCloneImplementation(set1);
65
58
  var number = structuredCloneImplementation(Object(7));
66
- return set2 === set1 || !set2.has(7) || typeof number != 'object' || +number !== 7;
59
+ return set2 === set1 || !set2.has(7) || !isObject(number) || +number !== 7;
67
60
  }) && structuredCloneImplementation;
68
61
  };
69
62
 
@@ -159,14 +152,15 @@ var cloneBuffer = function (value, map, $type) {
159
152
 
160
153
  // `ArrayBuffer#slice` is not available in IE10
161
154
  // `ArrayBuffer#slice` and `DataView` are not available in old FF
162
- if (!DataView && typeof value.slice != 'function') throwUnpolyfillable('ArrayBuffer');
155
+ if (!DataView && !isCallable(value.slice)) throwUnpolyfillable('ArrayBuffer');
163
156
  // detached buffers throws in `DataView` and `.slice`
164
157
  try {
165
- if (typeof value.slice == 'function' && !value.resizable) {
158
+ if (isCallable(value.slice) && !value.resizable) {
166
159
  clone = value.slice(0);
167
160
  } else {
168
161
  length = value.byteLength;
169
162
  options = 'maxByteLength' in value ? { maxByteLength: value.maxByteLength } : undefined;
163
+ // eslint-disable-next-line es/no-resizable-and-growable-arraybuffers -- safe
170
164
  clone = new ArrayBuffer(length, options);
171
165
  source = new DataView(value);
172
166
  target = new DataView(clone);
@@ -192,13 +186,7 @@ var cloneView = function (value, type, offset, length, map) {
192
186
  return new C(cloneBuffer(value.buffer, map), offset, length);
193
187
  };
194
188
 
195
- var Placeholder = function (object, type, metadata) {
196
- this.object = object;
197
- this.type = type;
198
- this.metadata = metadata;
199
- };
200
-
201
- var structuredCloneInternal = function (value, map, transferredBuffers) {
189
+ var structuredCloneInternal = function (value, map) {
202
190
  if (isSymbol(value)) throwUncloneable('Symbol');
203
191
  if (!isObject(value)) return value;
204
192
  // effectively preserves circular references
@@ -231,34 +219,21 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
231
219
  name = value.name;
232
220
  switch (name) {
233
221
  case 'AggregateError':
234
- cloned = new (getBuiltin('AggregateError'))([]);
222
+ cloned = new (getBuiltIn(name))([]);
235
223
  break;
236
224
  case 'EvalError':
237
- cloned = new EvalError();
238
- break;
239
225
  case 'RangeError':
240
- cloned = new RangeError();
241
- break;
242
226
  case 'ReferenceError':
243
- cloned = new ReferenceError();
244
- break;
227
+ case 'SuppressedError':
245
228
  case 'SyntaxError':
246
- cloned = new SyntaxError();
247
- break;
248
229
  case 'TypeError':
249
- cloned = new TypeError();
250
- break;
251
230
  case 'URIError':
252
- cloned = new URIError();
231
+ cloned = new (getBuiltIn(name))();
253
232
  break;
254
233
  case 'CompileError':
255
- cloned = new CompileError();
256
- break;
257
234
  case 'LinkError':
258
- cloned = new LinkError();
259
- break;
260
235
  case 'RuntimeError':
261
- cloned = new RuntimeError();
236
+ cloned = new (getBuiltIn('WebAssembly', name))();
262
237
  break;
263
238
  default:
264
239
  cloned = new Error();
@@ -269,9 +244,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
269
244
  break;
270
245
  case 'ArrayBuffer':
271
246
  case 'SharedArrayBuffer':
272
- cloned = transferredBuffers
273
- ? new Placeholder(value, type)
274
- : cloneBuffer(value, map, type);
247
+ cloned = cloneBuffer(value, map, type);
275
248
  break;
276
249
  case 'DataView':
277
250
  case 'Int8Array':
@@ -287,17 +260,15 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
287
260
  case 'BigInt64Array':
288
261
  case 'BigUint64Array':
289
262
  length = type === 'DataView' ? value.byteLength : value.length;
290
- cloned = transferredBuffers
291
- ? new Placeholder(value, type, { offset: value.byteOffset, length: length })
292
- : cloneView(value, type, value.byteOffset, length, map);
263
+ cloned = cloneView(value, type, value.byteOffset, length, map);
293
264
  break;
294
265
  case 'DOMQuad':
295
266
  try {
296
267
  cloned = new DOMQuad(
297
- structuredCloneInternal(value.p1, map, transferredBuffers),
298
- structuredCloneInternal(value.p2, map, transferredBuffers),
299
- structuredCloneInternal(value.p3, map, transferredBuffers),
300
- structuredCloneInternal(value.p4, map, transferredBuffers)
268
+ structuredCloneInternal(value.p1, map),
269
+ structuredCloneInternal(value.p2, map),
270
+ structuredCloneInternal(value.p3, map),
271
+ structuredCloneInternal(value.p4, map)
301
272
  );
302
273
  } catch (error) {
303
274
  cloned = tryNativeRestrictedStructuredClone(value, type);
@@ -318,7 +289,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
318
289
  dataTransfer = createDataTransfer();
319
290
  if (dataTransfer) {
320
291
  for (i = 0, length = lengthOfArrayLike(value); i < length; i++) {
321
- dataTransfer.items.add(structuredCloneInternal(value[i], map, transferredBuffers));
292
+ dataTransfer.items.add(structuredCloneInternal(value[i], map));
322
293
  }
323
294
  cloned = dataTransfer.files;
324
295
  } else cloned = tryNativeRestrictedStructuredClone(value, type);
@@ -327,7 +298,7 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
327
298
  // Safari 9 ImageData is a constructor, but typeof ImageData is 'object'
328
299
  try {
329
300
  cloned = new ImageData(
330
- structuredCloneInternal(value.data, map, transferredBuffers),
301
+ structuredCloneInternal(value.data, map),
331
302
  value.width,
332
303
  value.height,
333
304
  { colorSpace: value.colorSpace }
@@ -424,105 +395,38 @@ var structuredCloneInternal = function (value, map, transferredBuffers) {
424
395
  keys = objectKeys(value);
425
396
  for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
426
397
  key = keys[i];
427
- createProperty(cloned, key, structuredCloneInternal(value[key], map, transferredBuffers));
398
+ createProperty(cloned, key, structuredCloneInternal(value[key], map));
428
399
  } break;
429
400
  case 'Map':
430
401
  value.forEach(function (v, k) {
431
- mapSet(cloned, structuredCloneInternal(k, map, transferredBuffers), structuredCloneInternal(v, map, transferredBuffers));
402
+ mapSet(cloned, structuredCloneInternal(k, map), structuredCloneInternal(v, map));
432
403
  });
433
404
  break;
434
405
  case 'Set':
435
406
  value.forEach(function (v) {
436
- setAdd(cloned, structuredCloneInternal(v, map, transferredBuffers));
407
+ setAdd(cloned, structuredCloneInternal(v, map));
437
408
  });
438
409
  break;
439
410
  case 'Error':
440
- createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map, transferredBuffers));
411
+ createNonEnumerableProperty(cloned, 'message', structuredCloneInternal(value.message, map));
441
412
  if (hasOwn(value, 'cause')) {
442
- createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map, transferredBuffers));
413
+ createNonEnumerableProperty(cloned, 'cause', structuredCloneInternal(value.cause, map));
443
414
  }
444
415
  if (name === 'AggregateError') {
445
- cloned.errors = structuredCloneInternal(value.errors, map, transferredBuffers);
416
+ cloned.errors = structuredCloneInternal(value.errors, map);
417
+ } else if (name === 'SuppressedError') {
418
+ cloned.error = structuredCloneInternal(value.error, map);
419
+ cloned.suppressed = structuredCloneInternal(value.suppressed, map);
446
420
  } // break omitted
447
421
  case 'DOMException':
448
422
  if (ERROR_STACK_INSTALLABLE) {
449
- createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map, transferredBuffers));
423
+ createNonEnumerableProperty(cloned, 'stack', structuredCloneInternal(value.stack, map));
450
424
  }
451
425
  }
452
426
 
453
427
  return cloned;
454
428
  };
455
429
 
456
- var replacePlaceholders = function (value, map) {
457
- if (!isObject(value)) return value;
458
- if (mapHas(map, value)) return mapGet(map, value);
459
-
460
- var type, object, metadata, i, length, keys, key, replacement;
461
-
462
- if (value instanceof Placeholder) {
463
- type = value.type;
464
- object = value.object;
465
-
466
- switch (type) {
467
- case 'ArrayBuffer':
468
- case 'SharedArrayBuffer':
469
- replacement = cloneBuffer(object, map, type);
470
- break;
471
- case 'DataView':
472
- case 'Int8Array':
473
- case 'Uint8Array':
474
- case 'Uint8ClampedArray':
475
- case 'Int16Array':
476
- case 'Uint16Array':
477
- case 'Int32Array':
478
- case 'Uint32Array':
479
- case 'Float16Array':
480
- case 'Float32Array':
481
- case 'Float64Array':
482
- case 'BigInt64Array':
483
- case 'BigUint64Array':
484
- metadata = value.metadata;
485
- replacement = cloneView(object, type, metadata.offset, metadata.length, map);
486
- }
487
- } else switch (classof(value)) {
488
- case 'Array':
489
- case 'Object':
490
- keys = objectKeys(value);
491
- for (i = 0, length = lengthOfArrayLike(keys); i < length; i++) {
492
- key = keys[i];
493
- value[key] = replacePlaceholders(value[key], map);
494
- } break;
495
- case 'Map':
496
- replacement = new Map();
497
- value.forEach(function (v, k) {
498
- mapSet(replacement, replacePlaceholders(k, map), replacePlaceholders(v, map));
499
- });
500
- break;
501
- case 'Set':
502
- replacement = new Set();
503
- value.forEach(function (v) {
504
- setAdd(replacement, replacePlaceholders(v, map));
505
- });
506
- break;
507
- case 'Error':
508
- value.message = replacePlaceholders(value.message, map);
509
- if (hasOwn(value, 'cause')) {
510
- value.cause = replacePlaceholders(value.cause, map);
511
- }
512
- if (value.name === 'AggregateError') {
513
- value.errors = replacePlaceholders(value.errors, map);
514
- } // break omitted
515
- case 'DOMException':
516
- if (ERROR_STACK_INSTALLABLE) {
517
- value.stack = replacePlaceholders(value.stack, map);
518
- }
519
- }
520
-
521
- mapSet(map, value, replacement || value);
522
-
523
- return replacement || value;
524
- };
525
-
526
430
  var tryToTransfer = function (rawTransfer, map) {
527
431
  if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence');
528
432
 
@@ -534,7 +438,7 @@ var tryToTransfer = function (rawTransfer, map) {
534
438
 
535
439
  var i = 0;
536
440
  var length = lengthOfArrayLike(transfer);
537
- var buffers = [];
441
+ var buffers = new Set();
538
442
  var value, type, C, transferred, canvas, context;
539
443
 
540
444
  while (i < length) {
@@ -542,13 +446,15 @@ var tryToTransfer = function (rawTransfer, map) {
542
446
 
543
447
  type = classof(value);
544
448
 
449
+ if (type === 'ArrayBuffer' ? setHas(buffers, value) : mapHas(map, value)) {
450
+ throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
451
+ }
452
+
545
453
  if (type === 'ArrayBuffer') {
546
- push(buffers, value);
454
+ setAdd(buffers, value);
547
455
  continue;
548
456
  }
549
457
 
550
- if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
551
-
552
458
  if (PROPER_STRUCTURED_CLONE_TRANSFER) {
553
459
  transferred = nativeStructuredClone(value, { transfer: [value] });
554
460
  } else switch (type) {
@@ -587,25 +493,18 @@ var tryToTransfer = function (rawTransfer, map) {
587
493
  return buffers;
588
494
  };
589
495
 
590
- var tryToTransferBuffers = function (transfer, map) {
591
- var i = 0;
592
- var length = lengthOfArrayLike(transfer);
593
- var value, transferred;
594
-
595
- while (i < length) {
596
- value = transfer[i++];
597
-
598
- if (mapHas(map, value)) throw new DOMException('Duplicate transferable', DATA_CLONE_ERROR);
599
-
600
- if (arrayBufferTransfer) {
601
- transferred = arrayBufferTransfer(value, undefined, true);
496
+ var detachBuffers = function (buffers) {
497
+ setIterate(buffers, function (buffer) {
498
+ if (PROPER_STRUCTURED_CLONE_TRANSFER) {
499
+ nativeRestrictedStructuredClone(buffer, { transfer: [buffer] });
500
+ } else if (isCallable(buffer.transfer)) {
501
+ buffer.transfer();
502
+ } else if (detachTransferable) {
503
+ detachTransferable(buffer);
602
504
  } else {
603
- if (!isCallable(value.transfer)) throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
604
- transferred = value.transfer();
505
+ throwUnpolyfillable('ArrayBuffer', TRANSFERRING);
605
506
  }
606
-
607
- mapSet(map, value, transferred);
608
- }
507
+ });
609
508
  };
610
509
 
611
510
  // `structuredClone` method
@@ -614,24 +513,18 @@ $({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, for
614
513
  structuredClone: function structuredClone(value /* , { transfer } */) {
615
514
  var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined;
616
515
  var transfer = options ? options.transfer : undefined;
617
- var transferredBuffers = false;
618
516
  var map, buffers;
619
517
 
620
518
  if (transfer !== undefined) {
621
519
  map = new Map();
622
520
  buffers = tryToTransfer(transfer, map);
623
- transferredBuffers = !!lengthOfArrayLike(buffers);
624
521
  }
625
522
 
626
- var clone = structuredCloneInternal(value, map, transferredBuffers);
523
+ var clone = structuredCloneInternal(value, map);
627
524
 
628
- // since of an issue with cloning views of transferred buffers, we a forced to transfer / clone them in 2 steps
525
+ // since of an issue with cloning views of transferred buffers, we a forced to detach them later
629
526
  // https://github.com/zloirock/core-js/issues/1265
630
- if (transferredBuffers) {
631
- map = new Map();
632
- tryToTransferBuffers(transfer, map);
633
- clone = replacePlaceholders(clone, map);
634
- }
527
+ if (buffers) detachBuffers(buffers);
635
528
 
636
529
  return clone;
637
530
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "core-js",
3
- "version": "3.33.1",
3
+ "version": "3.33.3",
4
4
  "type": "commonjs",
5
5
  "description": "Standard library",
6
6
  "keywords": [
@@ -1,3 +1,4 @@
1
1
  'use strict';
2
+ // https://github.com/tc39/proposal-is-usv-string
2
3
  require('../modules/esnext.string.is-well-formed');
3
4
  require('../modules/esnext.string.to-well-formed');