core-js-pure
Advanced tools
Comparing version 3.30.1 to 3.30.2
@@ -14,2 +14,2 @@ var check = function (it) { | ||
// eslint-disable-next-line no-new-func -- fallback | ||
(function () { return this; })() || Function('return this')(); | ||
(function () { return this; })() || this || Function('return this')(); |
@@ -7,7 +7,7 @@ var IS_PURE = require('../internals/is-pure'); | ||
})('versions', []).push({ | ||
version: '3.30.1', | ||
version: '3.30.2', | ||
mode: IS_PURE ? 'pure' : 'global', | ||
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.30.1/LICENSE', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.30.2/LICENSE', | ||
source: 'https://github.com/zloirock/core-js' | ||
}); |
/* eslint-disable es/no-symbol -- required for testing */ | ||
var V8_VERSION = require('../internals/engine-v8-version'); | ||
var fails = require('../internals/fails'); | ||
var global = require('../internals/global'); | ||
var $String = global.String; | ||
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing | ||
@@ -10,5 +13,7 @@ module.exports = !!Object.getOwnPropertySymbols && !fails(function () { | ||
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances | ||
return !String(symbol) || !(Object(symbol) instanceof Symbol) || | ||
// nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will, | ||
// of course, fail. | ||
return !$String(symbol) || !(Object(symbol) instanceof Symbol) || | ||
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances | ||
!Symbol.sham && V8_VERSION && V8_VERSION < 41; | ||
}); |
@@ -128,2 +128,7 @@ var IS_PURE = require('../internals/is-pure'); | ||
var tryNativeRestrictedStructuredClone = function (value, type) { | ||
if (!nativeRestrictedStructuredClone) throwUnpolyfillable(type); | ||
return nativeRestrictedStructuredClone(value); | ||
}; | ||
var createDataTransfer = function () { | ||
@@ -249,7 +254,16 @@ var dataTransfer; | ||
} catch (error) { | ||
if (nativeRestrictedStructuredClone) { | ||
cloned = nativeRestrictedStructuredClone(value); | ||
} else throwUnpolyfillable(type); | ||
cloned = tryNativeRestrictedStructuredClone(value, type); | ||
} | ||
break; | ||
case 'File': | ||
if (nativeRestrictedStructuredClone) try { | ||
cloned = nativeRestrictedStructuredClone(value); | ||
// NodeJS 20.0.0 bug, https://github.com/nodejs/node/issues/47612 | ||
if (classof(cloned) !== type) cloned = undefined; | ||
} catch (error) { /* empty */ } | ||
if (!cloned) try { | ||
cloned = new File([value], value.name, value); | ||
} catch (error) { /* empty */ } | ||
if (!cloned) throwUnpolyfillable(type); | ||
break; | ||
case 'FileList': | ||
@@ -262,5 +276,3 @@ dataTransfer = createDataTransfer(); | ||
cloned = dataTransfer.files; | ||
} else if (nativeRestrictedStructuredClone) { | ||
cloned = nativeRestrictedStructuredClone(value); | ||
} else throwUnpolyfillable(type); | ||
} else cloned = tryNativeRestrictedStructuredClone(value, type); | ||
break; | ||
@@ -277,5 +289,3 @@ case 'ImageData': | ||
} catch (error) { | ||
if (nativeRestrictedStructuredClone) { | ||
cloned = nativeRestrictedStructuredClone(value); | ||
} else throwUnpolyfillable(type); | ||
cloned = tryNativeRestrictedStructuredClone(value, type); | ||
} break; | ||
@@ -372,8 +382,2 @@ default: | ||
} break; | ||
case 'File': | ||
try { | ||
cloned = new File([value], value.name, value); | ||
} catch (error) { | ||
throwUnpolyfillable(type); | ||
} break; | ||
case 'CropTarget': | ||
@@ -380,0 +384,0 @@ case 'CryptoKey': |
@@ -11,2 +11,3 @@ var $ = require('../internals/export'); | ||
// https://github.com/nodejs/node/issues/47505 | ||
// https://github.com/denoland/deno/issues/18893 | ||
var THROWS_WITHOUT_ARGUMENTS = USE_NATIVE_URL && fails(function () { | ||
@@ -13,0 +14,0 @@ URL.canParse(); |
{ | ||
"name": "core-js-pure", | ||
"version": "3.30.1", | ||
"version": "3.30.2", | ||
"description": "Standard library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
995541
23306