source: imaps-frontend/node_modules/core-js/internals/structured-clone-proper-transfer.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 4 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 779 bytes
RevLine 
[79a0317]1'use strict';
2var globalThis = require('../internals/global-this');
3var fails = require('../internals/fails');
4var V8 = require('../internals/environment-v8-version');
5var ENVIRONMENT = require('../internals/environment');
6
7var structuredClone = globalThis.structuredClone;
8
9module.exports = !!structuredClone && !fails(function () {
10 // prevent V8 ArrayBufferDetaching protector cell invalidation and performance degradation
11 // https://github.com/zloirock/core-js/issues/679
12 if ((ENVIRONMENT === 'DENO' && V8 > 92) || (ENVIRONMENT === 'NODE' && V8 > 94) || (ENVIRONMENT === 'BROWSER' && V8 > 97)) return false;
13 var buffer = new ArrayBuffer(8);
14 var clone = structuredClone(buffer, { transfer: [buffer] });
15 return buffer.byteLength !== 0 || clone.byteLength !== 8;
16});
Note: See TracBrowser for help on using the repository browser.