Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

core-js

Package Overview
Dependencies
Maintainers
1
Versions
276
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

core-js - npm Package Compare versions

Comparing version 3.37.1 to 3.38.0

actual/promise/try.js

1

actual/promise/index.js
'use strict';
var parent = require('../../stable/promise');
require('../../modules/esnext.promise.try');
require('../../modules/esnext.promise.with-resolvers');
module.exports = parent;
'use strict';
var parent = require('../../stable/regexp');
require('../../modules/esnext.regexp.escape');
module.exports = parent;

@@ -5,2 +5,4 @@ 'use strict';

require('../../modules/esnext.uint8-array.from-hex');
require('../../modules/esnext.uint8-array.set-from-base64');
require('../../modules/esnext.uint8-array.set-from-hex');
require('../../modules/esnext.uint8-array.to-base64');

@@ -7,0 +9,0 @@ require('../../modules/esnext.uint8-array.to-hex');

@@ -5,2 +5,4 @@ 'use strict';

require('../../modules/esnext.uint8-array.from-hex');
require('../../modules/esnext.uint8-array.set-from-base64');
require('../../modules/esnext.uint8-array.set-from-hex');
require('../../modules/esnext.uint8-array.to-base64');

@@ -7,0 +9,0 @@ require('../../modules/esnext.uint8-array.to-hex');

2

es/global-this.js
'use strict';
require('../modules/es.global-this');
module.exports = require('../internals/global');
module.exports = require('../internals/global-this');

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Float32Array;

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Float64Array;

@@ -13,2 +13,2 @@ 'use strict';

module.exports = require('../../internals/global');
module.exports = require('../../internals/global-this');

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Int16Array;

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Int32Array;

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Int8Array;

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Uint16Array;

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Uint32Array;

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Uint8Array;

@@ -6,4 +6,4 @@ 'use strict';

require('./methods');
var global = require('../../internals/global');
var global = require('../../internals/global-this');
module.exports = global.Uint8ClampedArray;

@@ -449,2 +449,4 @@ 'use strict';

require('../modules/esnext.uint8-array.from-hex');
require('../modules/esnext.uint8-array.set-from-base64');
require('../modules/esnext.uint8-array.set-from-hex');
require('../modules/esnext.uint8-array.to-base64');

@@ -451,0 +453,0 @@ require('../modules/esnext.uint8-array.to-hex');

@@ -6,5 +6,4 @@ 'use strict';

require('../../modules/esnext.promise.all-settled');
require('../../modules/esnext.promise.try');
require('../../modules/esnext.promise.any');
module.exports = parent;
'use strict';
require('../../modules/es.promise');
require('../../modules/esnext.promise.try');
var call = require('../../internals/function-call');
var isCallable = require('../../internals/is-callable');
var path = require('../../internals/path');
var parent = require('../../actual/promise/try');
var Promise = path.Promise;
var promiseTry = Promise['try'];
module.exports = { 'try': function (callbackfn) {
return call(promiseTry, isCallable(this) ? this : Promise, callbackfn);
} }['try'];
module.exports = parent;
'use strict';
require('../../modules/esnext.regexp.escape');
var path = require('../../internals/path');
var parent = require('../../actual/regexp/escape');
module.exports = path.RegExp.escape;
module.exports = parent;
'use strict';
var parent = require('../../actual/regexp');
require('../../modules/esnext.regexp.escape');
module.exports = parent;
'use strict';
var globalThis = require('../internals/global-this');
var uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');
var classof = require('../internals/classof-raw');
var $TypeError = TypeError;
var ArrayBuffer = globalThis.ArrayBuffer;
var TypeError = globalThis.TypeError;

@@ -10,5 +12,5 @@ // Includes

// - If IsSharedArrayBuffer(O) is true, throw a TypeError exception.
module.exports = uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {
if (classof(O) !== 'ArrayBuffer') throw new $TypeError('ArrayBuffer expected');
module.exports = ArrayBuffer && uncurryThisAccessor(ArrayBuffer.prototype, 'byteLength', 'get') || function (O) {
if (classof(O) !== 'ArrayBuffer') throw new TypeError('ArrayBuffer expected');
return O.byteLength;
};
'use strict';
var uncurryThis = require('../internals/function-uncurry-this');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this-clause');
var arrayBufferByteLength = require('../internals/array-buffer-byte-length');
var slice = uncurryThis(ArrayBuffer.prototype.slice);
var ArrayBuffer = globalThis.ArrayBuffer;
var ArrayBufferPrototype = ArrayBuffer && ArrayBuffer.prototype;
var slice = ArrayBufferPrototype && uncurryThis(ArrayBufferPrototype.slice);
module.exports = function (O) {
if (arrayBufferByteLength(O) !== 0) return false;
if (!slice) return false;
try {

@@ -10,0 +14,0 @@ slice(O, 0, 0);

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');
var uncurryThisAccessor = require('../internals/function-uncurry-this-accessor');
var toIndex = require('../internals/to-index');
var isDetached = require('../internals/array-buffer-is-detached');
var notDetached = require('../internals/array-buffer-not-detached');
var arrayBufferByteLength = require('../internals/array-buffer-byte-length');

@@ -11,6 +11,5 @@ var detachTransferable = require('../internals/detach-transferable');

var structuredClone = global.structuredClone;
var ArrayBuffer = global.ArrayBuffer;
var DataView = global.DataView;
var TypeError = global.TypeError;
var structuredClone = globalThis.structuredClone;
var ArrayBuffer = globalThis.ArrayBuffer;
var DataView = globalThis.DataView;
var min = Math.min;

@@ -30,3 +29,3 @@ var ArrayBufferPrototype = ArrayBuffer.prototype;

var newBuffer;
if (isDetached(arrayBuffer)) throw new TypeError('ArrayBuffer is detached');
notDetached(arrayBuffer);
if (PROPER_STRUCTURED_CLONE_TRANSFER) {

@@ -33,0 +32,0 @@ arrayBuffer = structuredClone(arrayBuffer, { transfer: [arrayBuffer] });

'use strict';
var NATIVE_ARRAY_BUFFER = require('../internals/array-buffer-basic-detection');
var DESCRIPTORS = require('../internals/descriptors');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var isCallable = require('../internals/is-callable');

@@ -22,5 +22,5 @@ var isObject = require('../internals/is-object');

var getInternalState = InternalStateModule.get;
var Int8Array = global.Int8Array;
var Int8Array = globalThis.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var Uint8ClampedArray = global.Uint8ClampedArray;
var Uint8ClampedArray = globalThis.Uint8ClampedArray;
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;

@@ -30,3 +30,3 @@ var TypedArray = Int8Array && getPrototypeOf(Int8Array);

var ObjectPrototype = Object.prototype;
var TypeError = global.TypeError;
var TypeError = globalThis.TypeError;

@@ -37,3 +37,3 @@ var TO_STRING_TAG = wellKnownSymbol('toStringTag');

// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(globalThis.opera) !== 'Opera';
var TYPED_ARRAY_TAG_REQUIRED = false;

@@ -94,3 +94,3 @@ var NAME, Constructor, Prototype;

if (forced) for (var ARRAY in TypedArrayConstructorsList) {
var TypedArrayConstructor = global[ARRAY];
var TypedArrayConstructor = globalThis[ARRAY];
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {

@@ -116,3 +116,3 @@ delete TypedArrayConstructor.prototype[KEY];

if (forced) for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = global[ARRAY];
TypedArrayConstructor = globalThis[ARRAY];
if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {

@@ -130,3 +130,3 @@ delete TypedArrayConstructor[KEY];

for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = global[ARRAY];
TypedArrayConstructor = globalThis[ARRAY];
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {

@@ -139,3 +139,3 @@ defineBuiltIn(TypedArrayConstructor, KEY, property);

for (NAME in TypedArrayConstructorsList) {
Constructor = global[NAME];
Constructor = globalThis[NAME];
Prototype = Constructor && Constructor.prototype;

@@ -147,3 +147,3 @@ if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;

for (NAME in BigIntArrayConstructorsList) {
Constructor = global[NAME];
Constructor = globalThis[NAME];
Prototype = Constructor && Constructor.prototype;

@@ -160,3 +160,3 @@ if (Prototype) enforceInternalState(Prototype)[TYPED_ARRAY_CONSTRUCTOR] = Constructor;

if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
if (globalThis[NAME]) setPrototypeOf(globalThis[NAME], TypedArray);
}

@@ -168,3 +168,3 @@ }

if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
if (globalThis[NAME]) setPrototypeOf(globalThis[NAME].prototype, TypedArrayPrototype);
}

@@ -186,4 +186,4 @@ }

});
for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
for (NAME in TypedArrayConstructorsList) if (globalThis[NAME]) {
createNonEnumerableProperty(globalThis[NAME], TYPED_ARRAY_TAG, NAME);
}

@@ -190,0 +190,0 @@ }

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');

@@ -36,10 +36,10 @@ var DESCRIPTORS = require('../internals/descriptors');

var setInternalState = InternalStateModule.set;
var NativeArrayBuffer = global[ARRAY_BUFFER];
var NativeArrayBuffer = globalThis[ARRAY_BUFFER];
var $ArrayBuffer = NativeArrayBuffer;
var ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];
var $DataView = global[DATA_VIEW];
var $DataView = globalThis[DATA_VIEW];
var DataViewPrototype = $DataView && $DataView[PROTOTYPE];
var ObjectPrototype = Object.prototype;
var Array = global.Array;
var RangeError = global.RangeError;
var Array = globalThis.Array;
var RangeError = globalThis.RangeError;
var fill = uncurryThis(arrayFill);

@@ -46,0 +46,0 @@ var reverse = uncurryThis([].reverse);

'use strict';
var fails = require('../internals/fails');
var wellKnownSymbol = require('../internals/well-known-symbol');
var V8_VERSION = require('../internals/engine-v8-version');
var V8_VERSION = require('../internals/environment-v8-version');

@@ -6,0 +6,0 @@ var SPECIES = wellKnownSymbol('species');

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var shared = require('../internals/shared-store');

@@ -13,3 +13,3 @@ var isCallable = require('../internals/is-callable');

var ASYNC_ITERATOR = wellKnownSymbol('asyncIterator');
var AsyncIterator = global.AsyncIterator;
var AsyncIterator = globalThis.AsyncIterator;
var PassedAsyncIteratorPrototype = shared.AsyncIteratorPrototype;

@@ -22,3 +22,3 @@ var AsyncIteratorPrototype, prototype;

AsyncIteratorPrototype = AsyncIterator.prototype;
} else if (shared[USE_FUNCTION_CONSTRUCTOR] || global[USE_FUNCTION_CONSTRUCTOR]) {
} else if (shared[USE_FUNCTION_CONSTRUCTOR] || globalThis[USE_FUNCTION_CONSTRUCTOR]) {
try {

@@ -25,0 +25,0 @@ // eslint-disable-next-line no-new-func -- we have no alternatives without usage of modern syntax

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');

@@ -22,3 +22,3 @@ var isForced = require('../internals/is-forced');

var ADDER = IS_MAP ? 'set' : 'add';
var NativeConstructor = global[CONSTRUCTOR_NAME];
var NativeConstructor = globalThis[CONSTRUCTOR_NAME];
var NativePrototype = NativeConstructor && NativeConstructor.prototype;

@@ -25,0 +25,0 @@ var Constructor = NativeConstructor;

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');

@@ -9,6 +9,6 @@ // eslint-disable-next-line es/no-object-defineproperty -- safe

try {
defineProperty(global, key, { value: value, configurable: true, writable: true });
defineProperty(globalThis, key, { value: value, configurable: true, writable: true });
} catch (error) {
global[key] = value;
globalThis[key] = value;
} return value;
};
'use strict';
var global = require('../internals/global');
var tryNodeRequire = require('../internals/try-node-require');
var globalThis = require('../internals/global-this');
var getBuiltInNodeModule = require('../internals/get-built-in-node-module');
var PROPER_STRUCTURED_CLONE_TRANSFER = require('../internals/structured-clone-proper-transfer');
var structuredClone = global.structuredClone;
var $ArrayBuffer = global.ArrayBuffer;
var $MessageChannel = global.MessageChannel;
var structuredClone = globalThis.structuredClone;
var $ArrayBuffer = globalThis.ArrayBuffer;
var $MessageChannel = globalThis.MessageChannel;
var detach = false;

@@ -18,3 +18,3 @@ var WorkerThreads, channel, buffer, $detach;

if (!$MessageChannel) {
WorkerThreads = tryNodeRequire('worker_threads');
WorkerThreads = getBuiltInNodeModule('worker_threads');
if (WorkerThreads) $MessageChannel = WorkerThreads.MessageChannel;

@@ -21,0 +21,0 @@ }

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var isObject = require('../internals/is-object');
var document = global.document;
var document = globalThis.document;
// typeof document.createElement is 'object' in old IE

@@ -7,0 +7,0 @@ var EXISTS = isObject(document) && isObject(document.createElement);

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');
module.exports = function (CONSTRUCTOR, METHOD) {
return uncurryThis(global[CONSTRUCTOR].prototype[METHOD]);
return uncurryThis(globalThis[CONSTRUCTOR].prototype[METHOD]);
};
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
module.exports = function (CONSTRUCTOR) {
return global[CONSTRUCTOR].prototype;
return globalThis[CONSTRUCTOR].prototype;
};
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;

@@ -31,7 +31,7 @@ var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');

if (GLOBAL) {
target = global;
target = globalThis;
} else if (STATIC) {
target = global[TARGET] || defineGlobalProperty(TARGET, {});
target = globalThis[TARGET] || defineGlobalProperty(TARGET, {});
} else {
target = global[TARGET] && global[TARGET].prototype;
target = globalThis[TARGET] && globalThis[TARGET].prototype;
}

@@ -38,0 +38,0 @@ if (target) for (key in source) {

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
module.exports = function (CONSTRUCTOR, METHOD) {
var Constructor = global[CONSTRUCTOR];
var Constructor = globalThis[CONSTRUCTOR];
var Prototype = Constructor && Constructor.prototype;
return Prototype && Prototype[METHOD];
};
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var isCallable = require('../internals/is-callable');

@@ -10,3 +10,3 @@

module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
return arguments.length < 2 ? aFunction(globalThis[namespace]) : globalThis[namespace] && globalThis[namespace][method];
};

@@ -64,3 +64,3 @@ 'use strict';

}
buffer[--index] |= sign * 128;
buffer[index - 1] |= sign * 128;
return buffer;

@@ -67,0 +67,0 @@ };

'use strict';
var NATIVE_WEAK_MAP = require('../internals/weak-map-basic-detection');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var isObject = require('../internals/is-object');

@@ -12,4 +12,4 @@ var createNonEnumerableProperty = require('../internals/create-non-enumerable-property');

var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
var TypeError = global.TypeError;
var WeakMap = global.WeakMap;
var TypeError = globalThis.TypeError;
var WeakMap = globalThis.WeakMap;
var set, get, has;

@@ -16,0 +16,0 @@

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var safeGetBuiltIn = require('../internals/safe-get-built-in');

@@ -7,11 +7,11 @@ var bind = require('../internals/function-bind-context');

var Queue = require('../internals/queue');
var IS_IOS = require('../internals/engine-is-ios');
var IS_IOS_PEBBLE = require('../internals/engine-is-ios-pebble');
var IS_WEBOS_WEBKIT = require('../internals/engine-is-webos-webkit');
var IS_NODE = require('../internals/engine-is-node');
var IS_IOS = require('../internals/environment-is-ios');
var IS_IOS_PEBBLE = require('../internals/environment-is-ios-pebble');
var IS_WEBOS_WEBKIT = require('../internals/environment-is-webos-webkit');
var IS_NODE = require('../internals/environment-is-node');
var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
var document = global.document;
var process = global.process;
var Promise = global.Promise;
var MutationObserver = globalThis.MutationObserver || globalThis.WebKitMutationObserver;
var document = globalThis.document;
var process = globalThis.process;
var Promise = globalThis.Promise;
var microtask = safeGetBuiltIn('queueMicrotask');

@@ -68,3 +68,3 @@ var notify, toggle, node, promise, then;

// `webpack` dev server bug on IE global methods - use bind(fn, global)
macrotask = bind(macrotask, global);
macrotask = bind(macrotask, globalThis);
notify = function () {

@@ -71,0 +71,0 @@ macrotask(flush);

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var globalIsFinite = global.isFinite;
var globalIsFinite = globalThis.isFinite;

@@ -6,0 +6,0 @@ // `Number.isFinite` method

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var fails = require('../internals/fails');

@@ -10,4 +10,4 @@ var uncurryThis = require('../internals/function-uncurry-this');

var charAt = uncurryThis(''.charAt);
var $parseFloat = global.parseFloat;
var Symbol = global.Symbol;
var $parseFloat = globalThis.parseFloat;
var Symbol = globalThis.Symbol;
var ITERATOR = Symbol && Symbol.iterator;

@@ -14,0 +14,0 @@ var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var fails = require('../internals/fails');

@@ -9,4 +9,4 @@ var uncurryThis = require('../internals/function-uncurry-this');

var $parseInt = global.parseInt;
var Symbol = global.Symbol;
var $parseInt = globalThis.parseInt;
var Symbol = globalThis.Symbol;
var ITERATOR = Symbol && Symbol.iterator;

@@ -13,0 +13,0 @@ var hex = /^[+-]?0x/i;

@@ -28,3 +28,4 @@ 'use strict';

var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
// eslint-disable-next-line no-useless-assignment -- avoid memory leak
activeXDocument = null;
return temp;

@@ -31,0 +32,0 @@ };

'use strict';
var IS_PURE = require('../internals/is-pure');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var fails = require('../internals/fails');
var WEBKIT = require('../internals/engine-webkit-version');
var WEBKIT = require('../internals/environment-webkit-version');

@@ -16,3 +16,3 @@ // Forced replacement object prototype accessors methods

__defineSetter__.call(null, key, function () { /* empty */ });
delete global[key];
delete globalThis[key];
});
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
module.exports = global;
module.exports = globalThis;
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var NativePromiseConstructor = require('../internals/promise-native-constructor');

@@ -8,6 +8,5 @@ var isCallable = require('../internals/is-callable');

var wellKnownSymbol = require('../internals/well-known-symbol');
var IS_BROWSER = require('../internals/engine-is-browser');
var IS_DENO = require('../internals/engine-is-deno');
var ENVIRONMENT = require('../internals/environment');
var IS_PURE = require('../internals/is-pure');
var V8_VERSION = require('../internals/engine-v8-version');
var V8_VERSION = require('../internals/environment-v8-version');

@@ -17,3 +16,3 @@ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;

var SUBCLASSING = false;
var NATIVE_PROMISE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);
var NATIVE_PROMISE_REJECTION_EVENT = isCallable(globalThis.PromiseRejectionEvent);

@@ -43,3 +42,3 @@ var FORCED_PROMISE_CONSTRUCTOR = isForced('Promise', function () {

// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
} return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT;
} return !GLOBAL_CORE_JS_PROMISE && (ENVIRONMENT === 'BROWSER' || ENVIRONMENT === 'DENO') && !NATIVE_PROMISE_REJECTION_EVENT;
});

@@ -46,0 +45,0 @@

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
module.exports = global.Promise;
module.exports = globalThis.Promise;
'use strict';
var fails = require('../internals/fails');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
var $RegExp = global.RegExp;
var $RegExp = globalThis.RegExp;

@@ -8,0 +8,0 @@ var UNSUPPORTED_Y = fails(function () {

'use strict';
var fails = require('../internals/fails');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
var $RegExp = global.RegExp;
var $RegExp = globalThis.RegExp;

@@ -8,0 +8,0 @@ module.exports = fails(function () {

'use strict';
var fails = require('../internals/fails');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
var $RegExp = global.RegExp;
var $RegExp = globalThis.RegExp;

@@ -8,0 +8,0 @@ module.exports = fails(function () {

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var DESCRIPTORS = require('../internals/descriptors');

@@ -10,5 +10,5 @@

module.exports = function (name) {
if (!DESCRIPTORS) return global[name];
var descriptor = getOwnPropertyDescriptor(global, name);
if (!DESCRIPTORS) return globalThis[name];
var descriptor = getOwnPropertyDescriptor(globalThis, name);
return descriptor && descriptor.value;
};
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var apply = require('../internals/function-apply');
var isCallable = require('../internals/is-callable');
var ENGINE_IS_BUN = require('../internals/engine-is-bun');
var USER_AGENT = require('../internals/engine-user-agent');
var ENVIRONMENT = require('../internals/environment');
var USER_AGENT = require('../internals/environment-user-agent');
var arraySlice = require('../internals/array-slice');
var validateArgumentsLength = require('../internals/validate-arguments-length');
var Function = global.Function;
var Function = globalThis.Function;
// dirty IE9- and Bun 0.3.0- checks
var WRAP = /MSIE .\./.test(USER_AGENT) || ENGINE_IS_BUN && (function () {
var version = global.Bun.version.split('.');
var WRAP = /MSIE .\./.test(USER_AGENT) || ENVIRONMENT === 'BUN' && (function () {
var version = globalThis.Bun.version.split('.');
return version.length < 3 || version[0] === '0' && (version[1] < 3 || version[1] === '3' && version[2] === '0');

@@ -15,0 +15,0 @@ })();

'use strict';
var IS_PURE = require('../internals/is-pure');
var globalThis = require('../internals/global');
var globalThis = require('../internals/global-this');
var defineGlobalProperty = require('../internals/define-global-property');

@@ -10,7 +10,7 @@

(store.versions || (store.versions = [])).push({
version: '3.37.1',
version: '3.38.0',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2014-2024 Denis Pushkarev (zloirock.ru)',
license: 'https://github.com/zloirock/core-js/blob/v3.37.1/LICENSE',
license: 'https://github.com/zloirock/core-js/blob/v3.38.0/LICENSE',
source: 'https://github.com/zloirock/core-js'
});
'use strict';
// https://github.com/zloirock/core-js/issues/280
var userAgent = require('../internals/engine-user-agent');
var userAgent = require('../internals/environment-user-agent');
module.exports = /Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(userAgent);
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var fails = require('../internals/fails');
var V8 = require('../internals/engine-v8-version');
var IS_BROWSER = require('../internals/engine-is-browser');
var IS_DENO = require('../internals/engine-is-deno');
var IS_NODE = require('../internals/engine-is-node');
var V8 = require('../internals/environment-v8-version');
var ENVIRONMENT = require('../internals/environment');
var structuredClone = global.structuredClone;
var structuredClone = globalThis.structuredClone;

@@ -14,3 +12,3 @@ module.exports = !!structuredClone && !fails(function () {

// https://github.com/zloirock/core-js/issues/679
if ((IS_DENO && V8 > 92) || (IS_NODE && V8 > 94) || (IS_BROWSER && V8 > 97)) return false;
if ((ENVIRONMENT === 'DENO' && V8 > 92) || (ENVIRONMENT === 'NODE' && V8 > 94) || (ENVIRONMENT === 'BROWSER' && V8 > 97)) return false;
var buffer = new ArrayBuffer(8);

@@ -17,0 +15,0 @@ var clone = structuredClone(buffer, { transfer: [buffer] });

'use strict';
/* eslint-disable es/no-symbol -- required for testing */
var V8_VERSION = require('../internals/engine-v8-version');
var V8_VERSION = require('../internals/environment-v8-version');
var fails = require('../internals/fails');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var $String = global.String;
var $String = globalThis.String;

@@ -9,0 +9,0 @@ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var apply = require('../internals/function-apply');

@@ -12,12 +12,12 @@ var bind = require('../internals/function-bind-context');

var validateArgumentsLength = require('../internals/validate-arguments-length');
var IS_IOS = require('../internals/engine-is-ios');
var IS_NODE = require('../internals/engine-is-node');
var IS_IOS = require('../internals/environment-is-ios');
var IS_NODE = require('../internals/environment-is-node');
var set = global.setImmediate;
var clear = global.clearImmediate;
var process = global.process;
var Dispatch = global.Dispatch;
var Function = global.Function;
var MessageChannel = global.MessageChannel;
var String = global.String;
var set = globalThis.setImmediate;
var clear = globalThis.clearImmediate;
var process = globalThis.process;
var Dispatch = globalThis.Dispatch;
var Function = globalThis.Function;
var MessageChannel = globalThis.MessageChannel;
var String = globalThis.String;
var counter = 0;

@@ -30,3 +30,3 @@ var queue = {};

// Deno throws a ReferenceError on `location` access without `--location` flag
$location = global.location;
$location = globalThis.location;
});

@@ -54,3 +54,3 @@

// old engines have not location.origin
global.postMessage(String(id), $location.protocol + '//' + $location.host);
globalThis.postMessage(String(id), $location.protocol + '//' + $location.host);
};

@@ -93,5 +93,5 @@

} else if (
global.addEventListener &&
isCallable(global.postMessage) &&
!global.importScripts &&
globalThis.addEventListener &&
isCallable(globalThis.postMessage) &&
!globalThis.importScripts &&
$location && $location.protocol !== 'file:' &&

@@ -101,3 +101,3 @@ !fails(globalPostMessageDefer)

defer = globalPostMessageDefer;
global.addEventListener('message', eventListener, false);
globalThis.addEventListener('message', eventListener, false);
// IE8-

@@ -104,0 +104,0 @@ } else if (ONREADYSTATECHANGE in createElement('script')) {

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var call = require('../internals/function-call');

@@ -41,3 +41,3 @@ var DESCRIPTORS = require('../internals/descriptors');

var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var RangeError = global.RangeError;
var RangeError = globalThis.RangeError;
var ArrayBuffer = ArrayBufferModule.ArrayBuffer;

@@ -120,3 +120,3 @@ var ArrayBufferPrototype = ArrayBuffer.prototype;

var SETTER = 'set' + TYPE;
var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
var NativeTypedArrayConstructor = globalThis[CONSTRUCTOR_NAME];
var TypedArrayConstructor = NativeTypedArrayConstructor;

@@ -123,0 +123,0 @@ var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;

'use strict';
/* eslint-disable no-new -- required for testing */
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var fails = require('../internals/fails');

@@ -8,4 +8,4 @@ var checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');

var ArrayBuffer = global.ArrayBuffer;
var Int8Array = global.Int8Array;
var ArrayBuffer = globalThis.ArrayBuffer;
var Int8Array = globalThis.Int8Array;

@@ -12,0 +12,0 @@ module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {

@@ -11,3 +11,3 @@ 'use strict';

// eslint-disable-next-line unicorn/relative-url-style -- required for testing
var url = new URL('b?a=1&b=2&c=3', 'http://a');
var url = new URL('b?a=1&b=2&c=3', 'https://a');
var params = url.searchParams;

@@ -28,3 +28,3 @@ var params2 = new URLSearchParams('a=1&a=2&b=3');

|| !params.sort
|| url.href !== 'http://a/c%20d?a=1&c=3'
|| url.href !== 'https://a/c%20d?a=1&c=3'
|| params.get('c') !== '3'

@@ -37,9 +37,9 @@ || String(new URLSearchParams('?a=1')) !== 'a=1'

// not punycoded in Edge
|| new URL('http://тест').host !== 'xn--e1aybc'
|| new URL('https://тест').host !== 'xn--e1aybc'
// not escaped in Chrome 62-
|| new URL('http://a#б').hash !== '#%D0%B1'
|| new URL('https://a#б').hash !== '#%D0%B1'
// fails in Chrome 66-
|| result !== 'a1c3'
// throws in Safari
|| new URL('http://x', undefined).host !== 'x';
|| new URL('https://x', undefined).host !== 'x';
});
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var isCallable = require('../internals/is-callable');
var WeakMap = global.WeakMap;
var WeakMap = globalThis.WeakMap;
module.exports = isCallable(WeakMap) && /native code/.test(String(WeakMap));
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var shared = require('../internals/shared');

@@ -9,3 +9,3 @@ var hasOwn = require('../internals/has-own-property');

var Symbol = global.Symbol;
var Symbol = globalThis.Symbol;
var WellKnownSymbolsStore = shared('wks');

@@ -12,0 +12,0 @@ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol['for'] || Symbol : Symbol && Symbol.withoutSetter || uid;

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var arrayBufferModule = require('../internals/array-buffer');

@@ -9,3 +9,3 @@ var setSpecies = require('../internals/set-species');

var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
var NativeArrayBuffer = global[ARRAY_BUFFER];
var NativeArrayBuffer = globalThis[ARRAY_BUFFER];

@@ -12,0 +12,0 @@ // `ArrayBuffer` constructor

@@ -13,3 +13,3 @@ 'use strict';

var wellKnownSymbol = require('../internals/well-known-symbol');
var V8_VERSION = require('../internals/engine-v8-version');
var V8_VERSION = require('../internals/environment-v8-version');

@@ -16,0 +16,0 @@ var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');

@@ -5,4 +5,4 @@ 'use strict';

var arrayMethodIsStrict = require('../internals/array-method-is-strict');
var CHROME_VERSION = require('../internals/engine-v8-version');
var IS_NODE = require('../internals/engine-is-node');
var CHROME_VERSION = require('../internals/environment-v8-version');
var IS_NODE = require('../internals/environment-is-node');

@@ -9,0 +9,0 @@ // Chrome 80-82 has a critical bug

@@ -5,4 +5,4 @@ 'use strict';

var arrayMethodIsStrict = require('../internals/array-method-is-strict');
var CHROME_VERSION = require('../internals/engine-v8-version');
var IS_NODE = require('../internals/engine-is-node');
var CHROME_VERSION = require('../internals/environment-v8-version');
var IS_NODE = require('../internals/environment-is-node');

@@ -9,0 +9,0 @@ // Chrome 80-82 has a critical bug

@@ -12,6 +12,6 @@ 'use strict';

var arrayMethodIsStrict = require('../internals/array-method-is-strict');
var FF = require('../internals/engine-ff-version');
var IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');
var V8 = require('../internals/engine-v8-version');
var WEBKIT = require('../internals/engine-webkit-version');
var FF = require('../internals/environment-ff-version');
var IE_OR_EDGE = require('../internals/environment-is-ie-or-edge');
var V8 = require('../internals/environment-v8-version');
var WEBKIT = require('../internals/environment-webkit-version');

@@ -18,0 +18,0 @@ var test = [];

'use strict';
/* eslint-disable no-unused-vars -- required for functions `.length` */
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var apply = require('../internals/function-apply');

@@ -9,3 +9,3 @@ var wrapErrorConstructorWithCause = require('../internals/wrap-error-constructor-with-cause');

var WEB_ASSEMBLY = 'WebAssembly';
var WebAssembly = global[WEB_ASSEMBLY];
var WebAssembly = globalThis[WEB_ASSEMBLY];

@@ -12,0 +12,0 @@ // eslint-disable-next-line es/no-error-cause -- feature detection

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
// `globalThis` object
// https://tc39.es/ecma262/#sec-globalthis
$({ global: true, forced: global.globalThis !== global }, {
globalThis: global
$({ global: true, forced: globalThis.globalThis !== globalThis }, {
globalThis: globalThis
});
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var setToStringTag = require('../internals/set-to-string-tag');

@@ -7,2 +7,2 @@

// https://tc39.es/ecma262/#sec-json-@@tostringtag
setToStringTag(global.JSON, 'JSON', true);
setToStringTag(globalThis.JSON, 'JSON', true);

@@ -5,3 +5,3 @@ 'use strict';

var DESCRIPTORS = require('../internals/descriptors');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var path = require('../internals/path');

@@ -23,6 +23,6 @@ var uncurryThis = require('../internals/function-uncurry-this');

var NUMBER = 'Number';
var NativeNumber = global[NUMBER];
var NativeNumber = globalThis[NUMBER];
var PureNumberNamespace = path[NUMBER];
var NumberPrototype = NativeNumber.prototype;
var TypeError = global.TypeError;
var TypeError = globalThis.TypeError;
var stringSlice = uncurryThis(''.slice);

@@ -29,0 +29,0 @@ var charCodeAt = uncurryThis(''.charCodeAt);

@@ -61,6 +61,3 @@ 'use strict';

var s = '';
var m = '';
var e = 0;
var c = '';
var d = '';
var m, e, c, d;
if (x < 0) {

@@ -78,5 +75,4 @@ s = '-';

e = floor(l);
var n = 0;
var w = pow(10, e - f);
n = round(x / w);
var n = round(x / w);
if (2 * x >= (2 * n + 1) * w) {

@@ -83,0 +79,0 @@ n += 1;

@@ -11,3 +11,3 @@ 'use strict';

// eslint-disable-next-line es/no-object-map-groupby -- testing
// eslint-disable-next-line es/no-object-groupby -- testing
var nativeGroupBy = Object.groupBy;

@@ -14,0 +14,0 @@ var create = getBuiltIn('Object', 'create');

'use strict';
var $ = require('../internals/export');
var IS_PURE = require('../internals/is-pure');
var IS_NODE = require('../internals/engine-is-node');
var global = require('../internals/global');
var IS_NODE = require('../internals/environment-is-node');
var globalThis = require('../internals/global-this');
var call = require('../internals/function-call');

@@ -35,9 +35,9 @@ var defineBuiltIn = require('../internals/define-built-in');

var PromisePrototype = NativePromisePrototype;
var TypeError = global.TypeError;
var document = global.document;
var process = global.process;
var TypeError = globalThis.TypeError;
var document = globalThis.document;
var process = globalThis.process;
var newPromiseCapability = newPromiseCapabilityModule.f;
var newGenericPromiseCapability = newPromiseCapability;
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
var DISPATCH_EVENT = !!(document && document.createEvent && globalThis.dispatchEvent);
var UNHANDLED_REJECTION = 'unhandledrejection';

@@ -115,5 +115,5 @@ var REJECTION_HANDLED = 'rejectionhandled';

event.initEvent(name, false, true);
global.dispatchEvent(event);
globalThis.dispatchEvent(event);
} else event = { promise: promise, reason: reason };
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = globalThis['on' + name])) handler(event);
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);

@@ -123,3 +123,3 @@ };

var onUnhandled = function (state) {
call(task, global, function () {
call(task, globalThis, function () {
var promise = state.facade;

@@ -147,3 +147,3 @@ var value = state.value;

var onHandleUnhandled = function (state) {
call(task, global, function () {
call(task, globalThis, function () {
var promise = state.facade;

@@ -150,0 +150,0 @@ if (IS_NODE) {

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var setToStringTag = require('../internals/set-to-string-tag');

@@ -10,2 +10,2 @@

// https://tc39.es/ecma262/#sec-reflect-@@tostringtag
setToStringTag(global.Reflect, 'Reflect', true);
setToStringTag(globalThis.Reflect, 'Reflect', true);
'use strict';
var DESCRIPTORS = require('../internals/descriptors');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');

@@ -26,5 +26,5 @@ var isForced = require('../internals/is-forced');

var MATCH = wellKnownSymbol('match');
var NativeRegExp = global.RegExp;
var NativeRegExp = globalThis.RegExp;
var RegExpPrototype = NativeRegExp.prototype;
var SyntaxError = global.SyntaxError;
var SyntaxError = globalThis.SyntaxError;
var exec = uncurryThis(RegExpPrototype.exec);

@@ -99,2 +99,7 @@ var charAt = uncurryThis(''.charAt);

case chr === '(':
result += chr;
// ignore non-capturing groups
if (stringSlice(string, index + 1, index + 3) === '?:') {
continue;
}
if (exec(IS_NCG, stringSlice(string, index + 1))) {

@@ -104,3 +109,2 @@ index += 2;

}
result += chr;
groupid++;

@@ -191,3 +195,3 @@ continue;

RegExpWrapper.prototype = RegExpPrototype;
defineBuiltIn(global, 'RegExp', RegExpWrapper, { constructor: true });
defineBuiltIn(globalThis, 'RegExp', RegExpWrapper, { constructor: true });
}

@@ -194,0 +198,0 @@

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var DESCRIPTORS = require('../internals/descriptors');

@@ -9,3 +9,3 @@ var defineBuiltInAccessor = require('../internals/define-built-in-accessor');

// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
var RegExp = global.RegExp;
var RegExp = globalThis.RegExp;
var RegExpPrototype = RegExp.prototype;

@@ -12,0 +12,0 @@

@@ -12,3 +12,3 @@ 'use strict';

var FORCED = fails(function () {
// eslint-disable-next-line es/no-array-string-prototype-at -- safe
// eslint-disable-next-line es/no-string-prototype-at -- safe
return '𠮷'.at(-2) !== '\uD842';

@@ -15,0 +15,0 @@ });

@@ -28,4 +28,3 @@ 'use strict';

var O = requireObjectCoercible(this);
var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, replacement;
var position = 0;
var IS_REG_EXP, flags, replacer, string, searchString, functionalReplace, searchLength, advanceBy, position, replacement;
var endOfLastMatch = 0;

@@ -40,7 +39,4 @@ var result = '';

replacer = getMethod(searchValue, REPLACE);
if (replacer) {
return call(replacer, searchValue, O, replaceValue);
} else if (IS_PURE && IS_REG_EXP) {
return replace(toString(O), searchValue, replaceValue);
}
if (replacer) return call(replacer, searchValue, O, replaceValue);
if (IS_PURE && IS_REG_EXP) return replace(toString(O), searchValue, replaceValue);
}

@@ -47,0 +43,0 @@ string = toString(O);

@@ -13,3 +13,3 @@ 'use strict';

var join = uncurryThis([].join);
// eslint-disable-next-line es/no-string-prototype-iswellformed-towellformed -- safe
// eslint-disable-next-line es/no-string-prototype-towellformed -- safe
var $toWellFormed = ''.toWellFormed;

@@ -16,0 +16,0 @@ var REPLACEMENT_CHARACTER = '\uFFFD';

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var call = require('../internals/function-call');

@@ -48,7 +48,7 @@ var uncurryThis = require('../internals/function-uncurry-this');

var ObjectPrototype = Object[PROTOTYPE];
var $Symbol = global.Symbol;
var $Symbol = globalThis.Symbol;
var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
var RangeError = global.RangeError;
var TypeError = global.TypeError;
var QObject = global.QObject;
var RangeError = globalThis.RangeError;
var TypeError = globalThis.TypeError;
var QObject = globalThis.QObject;
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;

@@ -172,3 +172,3 @@ var nativeDefineProperty = definePropertyModule.f;

var setter = function (value) {
var $this = this === undefined ? global : this;
var $this = this === undefined ? globalThis : this;
if ($this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);

@@ -175,0 +175,0 @@ if (hasOwn($this, HIDDEN) && hasOwn($this[HIDDEN], tag)) $this[HIDDEN][tag] = false;

@@ -6,3 +6,3 @@ // `Symbol.prototype.description` getter

var DESCRIPTORS = require('../internals/descriptors');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');

@@ -16,3 +16,3 @@ var hasOwn = require('../internals/has-own-property');

var NativeSymbol = global.Symbol;
var NativeSymbol = globalThis.Symbol;
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;

@@ -19,0 +19,0 @@

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var fails = require('../internals/fails');

@@ -10,3 +10,3 @@ var uncurryThis = require('../internals/function-uncurry-this');

var ITERATOR = wellKnownSymbol('iterator');
var Uint8Array = global.Uint8Array;
var Uint8Array = globalThis.Uint8Array;
var arrayValues = uncurryThis(ArrayIterators.values);

@@ -13,0 +13,0 @@ var arrayKeys = uncurryThis(ArrayIterators.keys);

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var call = require('../internals/function-call');

@@ -10,4 +10,4 @@ var ArrayBufferViewCore = require('../internals/array-buffer-view-core');

var RangeError = global.RangeError;
var Int8Array = global.Int8Array;
var RangeError = globalThis.RangeError;
var Int8Array = globalThis.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;

@@ -14,0 +14,0 @@ var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this-clause');

@@ -8,10 +8,10 @@ var fails = require('../internals/fails');

var ArrayBufferViewCore = require('../internals/array-buffer-view-core');
var FF = require('../internals/engine-ff-version');
var IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');
var V8 = require('../internals/engine-v8-version');
var WEBKIT = require('../internals/engine-webkit-version');
var FF = require('../internals/environment-ff-version');
var IE_OR_EDGE = require('../internals/environment-is-ie-or-edge');
var V8 = require('../internals/environment-v8-version');
var WEBKIT = require('../internals/environment-webkit-version');
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var Uint16Array = global.Uint16Array;
var Uint16Array = globalThis.Uint16Array;
var nativeSort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);

@@ -18,0 +18,0 @@

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var apply = require('../internals/function-apply');

@@ -8,3 +8,3 @@ var ArrayBufferViewCore = require('../internals/array-buffer-view-core');

var Int8Array = global.Int8Array;
var Int8Array = globalThis.Int8Array;
var aTypedArray = ArrayBufferViewCore.aTypedArray;

@@ -11,0 +11,0 @@ var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;

'use strict';
var exportTypedArrayMethod = require('../internals/array-buffer-view-core').exportTypedArrayMethod;
var fails = require('../internals/fails');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');
var Uint8Array = global.Uint8Array;
var Uint8Array = globalThis.Uint8Array;
var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};

@@ -9,0 +9,0 @@ var arrayToString = [].toString;

'use strict';
var FREEZING = require('../internals/freezing');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');

@@ -28,3 +28,3 @@ var defineBuiltIns = require('../internals/define-built-ins');

var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
var IS_IE11 = !globalThis.ActiveXObject && 'ActiveXObject' in globalThis;
var InternalWeakMap;

@@ -31,0 +31,0 @@

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var anInstance = require('../internals/an-instance');

@@ -22,3 +22,3 @@ var anObject = require('../internals/an-object');

var $TypeError = TypeError;
var NativeIterator = global[ITERATOR];
var NativeIterator = globalThis[ITERATOR];

@@ -25,0 +25,0 @@ // FF56- have non-standard global helper `Iterator`

'use strict';
var $ = require('../internals/export');
var DESCRIPTORS = require('../internals/descriptors');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var getBuiltIn = require('../internals/get-built-in');

@@ -19,5 +19,5 @@ var uncurryThis = require('../internals/function-uncurry-this');

var JSON = global.JSON;
var Number = global.Number;
var SyntaxError = global.SyntaxError;
var JSON = globalThis.JSON;
var Number = globalThis.Number;
var SyntaxError = globalThis.SyntaxError;
var nativeParse = JSON && JSON.parse;

@@ -34,3 +34,3 @@ var enumerableOwnProperties = getBuiltIn('Object', 'keys');

var IS_NON_ZERO_DIGIT = /^[1-9]$/;
var IS_NUMBER_START = /^(?:-|\d)$/;
var IS_NUMBER_START = /^[\d-]$/;
var IS_WHITESPACE = /^[\t\n\r ]$/;

@@ -200,5 +200,5 @@

if (at(source, i) === '0') i++;
else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, ++i);
else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, i + 1);
else throw new SyntaxError('Failed to parse number at: ' + i);
if (at(source, i) === '.') i = this.skip(IS_DIGIT, ++i);
if (at(source, i) === '.') i = this.skip(IS_DIGIT, i + 1);
if (at(source, i) === 'e' || at(source, i) === 'E') {

@@ -205,0 +205,0 @@ i++;

@@ -25,3 +25,2 @@ 'use strict';

var slice = uncurryThis(''.slice);
var exec = uncurryThis(/./.exec);
var push = uncurryThis([].push);

@@ -32,4 +31,7 @@

var ERROR_MESSAGE = 'Unacceptable as raw JSON';
var IS_WHITESPACE = /^[\t\n\r ]$/;
var isWhitespace = function (it) {
return it === ' ' || it === '\t' || it === '\n' || it === '\r';
};
// `JSON.parse` method

@@ -41,3 +43,3 @@ // https://tc39.es/proposal-json-parse-with-source/#sec-json.israwjson

var jsonString = toString(text);
if (jsonString === '' || exec(IS_WHITESPACE, at(jsonString, 0)) || exec(IS_WHITESPACE, at(jsonString, jsonString.length - 1))) {
if (jsonString === '' || isWhitespace(at(jsonString, 0)) || isWhitespace(at(jsonString, jsonString.length - 1))) {
throw new $SyntaxError(ERROR_MESSAGE);

@@ -44,0 +46,0 @@ }

'use strict';
var $ = require('../internals/export');
var globalThis = require('../internals/global-this');
var apply = require('../internals/function-apply');

@@ -9,7 +10,18 @@ var slice = require('../internals/array-slice');

var Promise = globalThis.Promise;
var ACCEPT_ARGUMENTS = false;
// Avoiding the use of polyfills of the previous iteration of this proposal
// that does not accept arguments of the callback
var FORCED = !Promise || !Promise['try'] || perform(function () {
Promise['try'](function (argument) {
ACCEPT_ARGUMENTS = argument === 8;
}, 8);
}).error || !ACCEPT_ARGUMENTS;
// `Promise.try` method
// https://github.com/tc39/proposal-promise-try
$({ target: 'Promise', stat: true, forced: true }, {
$({ target: 'Promise', stat: true, forced: FORCED }, {
'try': function (callbackfn /* , ...args */) {
var args = slice(arguments, 1);
var args = arguments.length > 1 ? slice(arguments, 1) : [];
var promiseCapability = newPromiseCapabilityModule.f(this);

@@ -16,0 +28,0 @@ var result = perform(function () {

'use strict';
var $ = require('../internals/export');
var uncurryThis = require('../internals/function-uncurry-this');
var toString = require('../internals/to-string');
var aString = require('../internals/a-string');
var hasOwn = require('../internals/has-own-property');
var padStart = require('../internals/string-pad').start;
var WHITESPACES = require('../internals/whitespaces');
var $Array = Array;
var $escape = RegExp.escape;
var charAt = uncurryThis(''.charAt);
var charCodeAt = uncurryThis(''.charCodeAt);
var replace = uncurryThis(''.replace);
var numberToString = uncurryThis(1.1.toString);
var NEED_ESCAPING = RegExp('[!"#$%&\'()*+,\\-./:;<=>?@[\\\\\\]^`{|}~' + WHITESPACES + ']', 'g');
var join = uncurryThis([].join);
var FIRST_DIGIT_OR_ASCII = /^[0-9a-z]/i;
var SYNTAX_SOLIDUS = /^[$()*+./?[\\\]^{|}]/;
var OTHER_PUNCTUATORS_AND_WHITESPACES = RegExp('^[!"#%&\',\\-:;<=>@`~' + WHITESPACES + ']');
var exec = uncurryThis(FIRST_DIGIT_OR_ASCII.exec);
var ControlEscape = {
'\u0009': 't',
'\u000A': 'n',
'\u000B': 'v',
'\u000C': 'f',
'\u000D': 'r'
};
var escapeChar = function (chr) {
var hex = numberToString(charCodeAt(chr, 0), 16);
return hex.length < 3 ? '\\x' + padStart(hex, 2, '0') : '\\u' + padStart(hex, 4, '0');
};
// Avoiding the use of polyfills of the previous iteration of this proposal
var FORCED = !$escape || $escape('ab') !== '\\x61b';
// `RegExp.escape` method
// https://github.com/tc39/proposal-regex-escaping
$({ target: 'RegExp', stat: true, forced: true }, {
$({ target: 'RegExp', stat: true, forced: FORCED }, {
escape: function escape(S) {
var str = toString(S);
var firstCode = charCodeAt(str, 0);
// escape first DecimalDigit
return (firstCode > 47 && firstCode < 58 ? '\\x3' : '') + replace(str, NEED_ESCAPING, function (match) {
var hex = numberToString(charCodeAt(match, 0), 16);
return hex.length < 3 ? '\\x' + padStart(hex, 2, '0') : '\\u' + padStart(hex, 4, '0');
});
aString(S);
var length = S.length;
var result = $Array(length);
for (var i = 0; i < length; i++) {
var chr = charAt(S, i);
if (i === 0 && exec(FIRST_DIGIT_OR_ASCII, chr)) {
result[i] = escapeChar(chr);
} else if (hasOwn(ControlEscape, chr)) {
result[i] = '\\' + ControlEscape[chr];
} else if (exec(SYNTAX_SOLIDUS, chr)) {
result[i] = '\\' + chr;
} else if (exec(OTHER_PUNCTUATORS_AND_WHITESPACES, chr)) {
result[i] = escapeChar(chr);
} else {
var charCode = charCodeAt(chr, 0);
// single UTF-16 code unit
if ((charCode & 0xF800) !== 0xD800) result[i] = chr;
// unpaired surrogate
else if (charCode >= 0xDC00 || i + 1 >= length || (charCodeAt(S, i + 1) & 0xFC00) !== 0xDC00) result[i] = escapeChar(chr);
// surrogate pair
else {
result[i] = chr;
result[++i] = charAt(S, i);
}
}
}
return join(result, '');
}
});
'use strict';
var $ = require('../internals/export');
var globalThis = require('../internals/global');
var globalThis = require('../internals/global-this');
var isPrototypeOf = require('../internals/object-is-prototype-of');

@@ -5,0 +5,0 @@ var getPrototypeOf = require('../internals/object-get-prototype-of');

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var defineWellKnownSymbol = require('../internals/well-known-symbol-define');

@@ -7,3 +7,3 @@ var defineProperty = require('../internals/object-define-property').f;

var Symbol = global.Symbol;
var Symbol = globalThis.Symbol;

@@ -10,0 +10,0 @@ // `Symbol.asyncDispose` well-known symbol

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var defineWellKnownSymbol = require('../internals/well-known-symbol-define');

@@ -7,3 +7,3 @@ var defineProperty = require('../internals/object-define-property').f;

var Symbol = global.Symbol;
var Symbol = globalThis.Symbol;

@@ -10,0 +10,0 @@ // `Symbol.dispose` well-known symbol

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var uncurryThis = require('../internals/function-uncurry-this');
var anObjectOrUndefined = require('../internals/an-object-or-undefined');
var aString = require('../internals/a-string');
var hasOwn = require('../internals/has-own-property');
var globalThis = require('../internals/global-this');
var arrayFromConstructorAndList = require('../internals/array-from-constructor-and-list');
var base64Map = require('../internals/base64-map');
var getAlphabetOption = require('../internals/get-alphabet-option');
var $fromBase64 = require('../internals/uint8-from-base64');
var base64Alphabet = base64Map.c2i;
var base64UrlAlphabet = base64Map.c2iUrl;
var Uint8Array = globalThis.Uint8Array;
var Uint8Array = global.Uint8Array;
var SyntaxError = global.SyntaxError;
var charAt = uncurryThis(''.charAt);
var replace = uncurryThis(''.replace);
var stringSlice = uncurryThis(''.slice);
var push = uncurryThis([].push);
var SPACES = /[\t\n\f\r ]/g;
var EXTRA_BITS = 'Extra bits';
// `Uint8Array.fromBase64` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', stat: true, forced: true }, {
if (Uint8Array) $({ target: 'Uint8Array', stat: true }, {
fromBase64: function fromBase64(string /* , options */) {
aString(string);
var options = arguments.length > 1 ? anObjectOrUndefined(arguments[1]) : undefined;
var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;
var strict = options ? !!options.strict : false;
var input = strict ? string : replace(string, SPACES, '');
if (input.length % 4 === 0) {
if (stringSlice(input, -2) === '==') input = stringSlice(input, 0, -2);
else if (stringSlice(input, -1) === '=') input = stringSlice(input, 0, -1);
} else if (strict) throw new SyntaxError('Input is not correctly padded');
var lastChunkSize = input.length % 4;
switch (lastChunkSize) {
case 1: throw new SyntaxError('Bad input length');
case 2: input += 'AA'; break;
case 3: input += 'A';
}
var bytes = [];
var i = 0;
var inputLength = input.length;
var at = function (shift) {
var chr = charAt(input, i + shift);
if (!hasOwn(alphabet, chr)) throw new SyntaxError('Bad char in input: "' + chr + '"');
return alphabet[chr] << (18 - 6 * shift);
};
for (; i < inputLength; i += 4) {
var triplet = at(0) + at(1) + at(2) + at(3);
push(bytes, (triplet >> 16) & 255, (triplet >> 8) & 255, triplet & 255);
}
var byteLength = bytes.length;
if (lastChunkSize === 2) {
if (strict && bytes[byteLength - 2] !== 0) throw new SyntaxError(EXTRA_BITS);
byteLength -= 2;
} else if (lastChunkSize === 3) {
if (strict && bytes[byteLength - 1] !== 0) throw new SyntaxError(EXTRA_BITS);
byteLength--;
}
return arrayFromConstructorAndList(Uint8Array, bytes, byteLength);
var result = $fromBase64(string, arguments.length > 1 ? arguments[1] : undefined, null, 0x1FFFFFFFFFFFFF);
return arrayFromConstructorAndList(Uint8Array, result.bytes);
}
});
'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var uncurryThis = require('../internals/function-uncurry-this');
var globalThis = require('../internals/global-this');
var aString = require('../internals/a-string');
var $fromHex = require('../internals/uint8-from-hex');
var Uint8Array = global.Uint8Array;
var SyntaxError = global.SyntaxError;
var parseInt = global.parseInt;
var NOT_HEX = /[^\da-f]/i;
var exec = uncurryThis(NOT_HEX.exec);
var stringSlice = uncurryThis(''.slice);
// `Uint8Array.fromHex` method
// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', stat: true, forced: true }, {
if (globalThis.Uint8Array) $({ target: 'Uint8Array', stat: true }, {
fromHex: function fromHex(string) {
aString(string);
var stringLength = string.length;
if (stringLength % 2) throw new SyntaxError('String should have an even number of characters');
if (exec(NOT_HEX, string)) throw new SyntaxError('String should only contain hex characters');
var result = new Uint8Array(stringLength / 2);
for (var i = 0; i < stringLength; i += 2) {
result[i / 2] = parseInt(stringSlice(string, i, i + 2), 16);
}
return result;
return $fromHex(aString(string)).bytes;
}
});
'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');
var anObjectOrUndefined = require('../internals/an-object-or-undefined');
var anUint8Array = require('../internals/an-uint8-array');
var notDetached = require('../internals/array-buffer-not-detached');
var base64Map = require('../internals/base64-map');

@@ -13,3 +14,2 @@ var getAlphabetOption = require('../internals/get-alphabet-option');

var Uint8Array = global.Uint8Array;
var charAt = uncurryThis(''.charAt);

@@ -19,3 +19,3 @@

// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: true }, {
if (globalThis.Uint8Array) $({ target: 'Uint8Array', proto: true }, {
toBase64: function toBase64(/* options */) {

@@ -25,2 +25,4 @@ var array = anUint8Array(this);

var alphabet = getAlphabetOption(options) === 'base64' ? base64Alphabet : base64UrlAlphabet;
var omitPadding = !!options && !!options.omitPadding;
notDetached(this.buffer);

@@ -42,6 +44,6 @@ var result = '';

triplet = (array[i] << 16) + (array[i + 1] << 8);
result += at(3) + at(2) + at(1) + '=';
result += at(3) + at(2) + at(1) + (omitPadding ? '' : '=');
} else if (i + 1 === length) {
triplet = array[i] << 16;
result += at(3) + at(2) + '==';
result += at(3) + at(2) + (omitPadding ? '' : '==');
}

@@ -48,0 +50,0 @@

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var uncurryThis = require('../internals/function-uncurry-this');
var anUint8Array = require('../internals/an-uint8-array');
var notDetached = require('../internals/array-buffer-not-detached');
var Uint8Array = global.Uint8Array;
var numberToString = uncurryThis(1.0.toString);

@@ -12,5 +12,6 @@

// https://github.com/tc39/proposal-arraybuffer-base64
if (Uint8Array) $({ target: 'Uint8Array', proto: true, forced: true }, {
if (globalThis.Uint8Array) $({ target: 'Uint8Array', proto: true }, {
toHex: function toHex() {
anUint8Array(this);
notDetached(this.buffer);
var result = '';

@@ -17,0 +18,0 @@ for (var i = 0, length = this.length; i < length; i++) {

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var getBuiltIn = require('../internals/get-built-in');

@@ -48,3 +48,3 @@ var uncurryThis = require('../internals/function-uncurry-this');

// `webpack` dev server bug on IE global methods - use call(fn, global, ...)
if (BASIC && !NO_SPACES_IGNORE && !NO_ENCODING_CHECK) return call($atob, global, data);
if (BASIC && !NO_SPACES_IGNORE && !NO_ENCODING_CHECK) return call($atob, globalThis, data);
var string = replace(toString(data), whitespaces, '');

@@ -51,0 +51,0 @@ var output = '';

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var getBuiltIn = require('../internals/get-built-in');

@@ -36,3 +36,3 @@ var uncurryThis = require('../internals/function-uncurry-this');

// `webpack` dev server bug on IE global methods - use call(fn, global, ...)
if (BASIC) return call($btoa, global, toString(data));
if (BASIC) return call($btoa, globalThis, toString(data));
var string = toString(data);

@@ -39,0 +39,0 @@ var output = '';

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var clearImmediate = require('../internals/task').clear;

@@ -8,4 +8,4 @@

// http://w3c.github.io/setImmediate/#si-clearImmediate
$({ global: true, bind: true, enumerable: true, forced: global.clearImmediate !== clearImmediate }, {
$({ global: true, bind: true, enumerable: true, forced: globalThis.clearImmediate !== clearImmediate }, {
clearImmediate: clearImmediate
});
'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var DOMIterables = require('../internals/dom-iterables');

@@ -19,3 +19,3 @@ var DOMTokenListPrototype = require('../internals/dom-token-list-prototype');

if (DOMIterables[COLLECTION_NAME]) {
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype);
}

@@ -22,0 +22,0 @@ }

'use strict';
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var DOMIterables = require('../internals/dom-iterables');

@@ -34,5 +34,5 @@ var DOMTokenListPrototype = require('../internals/dom-token-list-prototype');

for (var COLLECTION_NAME in DOMIterables) {
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);
handlePrototype(globalThis[COLLECTION_NAME] && globalThis[COLLECTION_NAME].prototype, COLLECTION_NAME);
}
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
'use strict';
var $ = require('../internals/export');
var tryNodeRequire = require('../internals/try-node-require');
var getBuiltIn = require('../internals/get-built-in');
var getBuiltInNodeModule = require('../internals/get-built-in-node-module');
var fails = require('../internals/fails');

@@ -29,3 +29,3 @@ var create = require('../internals/object-create');

// NodeJS < 15.0 does not expose `MessageChannel` to global
var MessageChannel = getBuiltIn('MessageChannel') || tryNodeRequire('worker_threads').MessageChannel;
var MessageChannel = getBuiltIn('MessageChannel') || getBuiltInNodeModule('worker_threads').MessageChannel;
// eslint-disable-next-line es/no-weak-map, unicorn/require-post-message-target-origin -- safe

@@ -32,0 +32,0 @@ new MessageChannel().port1.postMessage(new WeakMap());

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var getBuiltIn = require('../internals/get-built-in');

@@ -39,3 +39,3 @@ var createPropertyDescriptor = require('../internals/create-property-descriptor');

// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(global, DOM_EXCEPTION);
var descriptor = NativeDOMException && DESCRIPTORS && Object.getOwnPropertyDescriptor(globalThis, DOM_EXCEPTION);

@@ -42,0 +42,0 @@ // Bun ~ 0.1.1 DOMException have incorrect descriptor and we can't redefine it

'use strict';
var $ = require('../internals/export');
var globalThis = require('../internals/global');
var globalThis = require('../internals/global-this');
var microtask = require('../internals/microtask');

@@ -5,0 +5,0 @@ var aCallable = require('../internals/a-callable');

'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var defineBuiltInAccessor = require('../internals/define-built-in-accessor');

@@ -10,3 +10,3 @@ var DESCRIPTORS = require('../internals/descriptors');

var defineProperty = Object.defineProperty;
var INCORRECT_VALUE = global.self !== global;
var INCORRECT_VALUE = globalThis.self !== globalThis;

@@ -18,13 +18,13 @@ // `self` getter

// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
var descriptor = Object.getOwnPropertyDescriptor(global, 'self');
var descriptor = Object.getOwnPropertyDescriptor(globalThis, 'self');
// some engines have `self`, but with incorrect descriptor
// https://github.com/denoland/deno/issues/15765
if (INCORRECT_VALUE || !descriptor || !descriptor.get || !descriptor.enumerable) {
defineBuiltInAccessor(global, 'self', {
defineBuiltInAccessor(globalThis, 'self', {
get: function self() {
return global;
return globalThis;
},
set: function self(value) {
if (this !== global) throw new $TypeError('Illegal invocation');
defineProperty(global, 'self', {
if (this !== globalThis) throw new $TypeError('Illegal invocation');
defineProperty(globalThis, 'self', {
value: value,

@@ -41,4 +41,4 @@ writable: true,

} else $({ global: true, simple: true, forced: INCORRECT_VALUE }, {
self: global
self: globalThis
});
} catch (error) { /* empty */ }
'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var setTask = require('../internals/task').set;

@@ -8,8 +8,8 @@ var schedulersFix = require('../internals/schedulers-fix');

// https://github.com/oven-sh/bun/issues/1633
var setImmediate = global.setImmediate ? schedulersFix(setTask, false) : setTask;
var setImmediate = globalThis.setImmediate ? schedulersFix(setTask, false) : setTask;
// `setImmediate` method
// http://w3c.github.io/setImmediate/#si-setImmediate
$({ global: true, bind: true, enumerable: true, forced: global.setImmediate !== setImmediate }, {
$({ global: true, bind: true, enumerable: true, forced: globalThis.setImmediate !== setImmediate }, {
setImmediate: setImmediate
});
'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var schedulersFix = require('../internals/schedulers-fix');
var setInterval = schedulersFix(global.setInterval, true);
var setInterval = schedulersFix(globalThis.setInterval, true);
// Bun / IE9- setInterval additional parameters fix
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-setinterval
$({ global: true, bind: true, forced: global.setInterval !== setInterval }, {
$({ global: true, bind: true, forced: globalThis.setInterval !== setInterval }, {
setInterval: setInterval
});
'use strict';
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var schedulersFix = require('../internals/schedulers-fix');
var setTimeout = schedulersFix(global.setTimeout, true);
var setTimeout = schedulersFix(globalThis.setTimeout, true);
// Bun / IE9- setTimeout additional parameters fix
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-settimeout
$({ global: true, bind: true, forced: global.setTimeout !== setTimeout }, {
$({ global: true, bind: true, forced: globalThis.setTimeout !== setTimeout }, {
setTimeout: setTimeout
});
'use strict';
var IS_PURE = require('../internals/is-pure');
var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var getBuiltIn = require('../internals/get-built-in');

@@ -30,8 +30,8 @@ var uncurryThis = require('../internals/function-uncurry-this');

var Object = global.Object;
var Array = global.Array;
var Date = global.Date;
var Error = global.Error;
var TypeError = global.TypeError;
var PerformanceMark = global.PerformanceMark;
var Object = globalThis.Object;
var Array = globalThis.Array;
var Date = globalThis.Date;
var Error = globalThis.Error;
var TypeError = globalThis.TypeError;
var PerformanceMark = globalThis.PerformanceMark;
var DOMException = getBuiltIn('DOMException');

@@ -57,3 +57,3 @@ var Map = MapHelpers.Map;

return !fails(function () {
var set1 = new global.Set([7]);
var set1 = new globalThis.Set([7]);
var set2 = structuredCloneImplementation(set1);

@@ -76,3 +76,3 @@ var number = structuredCloneImplementation(Object(7));

return !fails(function () {
var test = structuredCloneImplementation(new global.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));
var test = structuredCloneImplementation(new globalThis.AggregateError([1], PERFORMANCE_MARK, { cause: 3 }));
return test.name !== 'AggregateError' || test.errors[0] !== 1 || test.message !== PERFORMANCE_MARK || test.cause !== 3;

@@ -94,3 +94,3 @@ });

// only FF103+ supports new (html/5749) error cloning semantic
var nativeStructuredClone = global.structuredClone;
var nativeStructuredClone = globalThis.structuredClone;

@@ -135,6 +135,6 @@ var FORCED_REPLACEMENT = IS_PURE

try {
dataTransfer = new global.DataTransfer();
dataTransfer = new globalThis.DataTransfer();
} catch (error) {
try {
dataTransfer = new global.ClipboardEvent('').clipboardData;
dataTransfer = new globalThis.ClipboardEvent('').clipboardData;
} catch (error2) { /* empty */ }

@@ -156,3 +156,3 @@ }

} else {
var DataView = global.DataView;
var DataView = globalThis.DataView;

@@ -188,3 +188,3 @@ // `ArrayBuffer#slice` is not available in IE10

var cloneView = function (value, type, offset, length, map) {
var C = global[type];
var C = globalThis[type];
// in some old engines like Safari 9, typeof C is 'object'

@@ -344,3 +344,3 @@ // on Uint8ClampedArray or some other constructors

case 'DOMPointReadOnly':
C = global[type];
C = globalThis[type];
try {

@@ -355,3 +355,3 @@ cloned = C.fromPoint

case 'DOMRectReadOnly':
C = global[type];
C = globalThis[type];
try {

@@ -366,3 +366,3 @@ cloned = C.fromRect

case 'DOMMatrixReadOnly':
C = global[type];
C = globalThis[type];
try {

@@ -472,3 +472,3 @@ cloned = C.fromMatrix

case 'ImageBitmap':
C = global.OffscreenCanvas;
C = globalThis.OffscreenCanvas;
if (!isConstructor(C)) throwUnpolyfillable(type, TRANSFERRING);

@@ -475,0 +475,0 @@ try {

@@ -5,3 +5,3 @@ 'use strict';

var $ = require('../internals/export');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var safeGetBuiltIn = require('../internals/safe-get-built-in');

@@ -47,6 +47,6 @@ var call = require('../internals/function-call');

var HeadersPrototype = Headers && Headers.prototype;
var RegExp = global.RegExp;
var TypeError = global.TypeError;
var decodeURIComponent = global.decodeURIComponent;
var encodeURIComponent = global.encodeURIComponent;
var RegExp = globalThis.RegExp;
var TypeError = globalThis.TypeError;
var decodeURIComponent = globalThis.decodeURIComponent;
var encodeURIComponent = globalThis.encodeURIComponent;
var charAt = uncurryThis(''.charAt);

@@ -53,0 +53,0 @@ var join = uncurryThis([].join);

@@ -7,3 +7,3 @@ 'use strict';

var USE_NATIVE_URL = require('../internals/url-constructor-detection');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
var bind = require('../internals/function-bind-context');

@@ -31,5 +31,5 @@ var uncurryThis = require('../internals/function-uncurry-this');

var NativeURL = global.URL;
var TypeError = global.TypeError;
var parseInt = global.parseInt;
var NativeURL = globalThis.URL;
var TypeError = globalThis.TypeError;
var parseInt = globalThis.parseInt;
var floor = Math.floor;

@@ -208,7 +208,3 @@ var pow = Math.pow;

}
if (currLength > maxLength) {
maxIndex = currStart;
maxLength = currLength;
}
return maxIndex;
return currLength > maxLength ? currStart : maxIndex;
};

@@ -219,2 +215,3 @@

var result, index, compress, ignore0;
// ipv4

@@ -226,5 +223,8 @@ if (typeof host == 'number') {

host = floor(host / 256);
} return join(result, '.');
}
return join(result, '.');
}
// ipv6
} else if (typeof host == 'object') {
if (typeof host == 'object') {
result = '';

@@ -244,3 +244,5 @@ compress = findLongestZeroSequence(host);

return '[' + result + ']';
} return host;
}
return host;
};

@@ -247,0 +249,0 @@

{
"name": "core-js",
"version": "3.37.1",
"version": "3.38.0",
"type": "commonjs",

@@ -20,2 +20,3 @@ "description": "Standard library",

"ES2023",
"ES2024",
"ECMAScript 3",

@@ -34,2 +35,3 @@ "ECMAScript 5",

"ECMAScript 2023",
"ECMAScript 2024",
"Map",

@@ -36,0 +38,0 @@ "Set",

@@ -5,3 +5,5 @@ 'use strict';

require('../modules/esnext.uint8-array.from-hex');
require('../modules/esnext.uint8-array.set-from-base64');
require('../modules/esnext.uint8-array.set-from-hex');
require('../modules/esnext.uint8-array.to-base64');
require('../modules/esnext.uint8-array.to-hex');
'use strict';
// https://github.com/tc39/proposal-global
require('../modules/esnext.global-this');
var global = require('../internals/global');
var globalThis = require('../internals/global-this');
module.exports = global;
module.exports = globalThis;

@@ -5,4 +5,3 @@ 'use strict';

require('../proposals/math-sum');
require('../proposals/promise-try');
module.exports = parent;

@@ -8,3 +8,2 @@ 'use strict';

require('../proposals/map-upsert-stage-2');
require('../proposals/regexp-escaping');
require('../proposals/string-dedent');

@@ -11,0 +10,0 @@ require('../proposals/symbol-predicates-v2');

@@ -11,2 +11,4 @@ 'use strict';

require('../proposals/json-parse-with-source');
require('../proposals/promise-try');
require('../proposals/regexp-escaping');
// TODO: Obsolete versions, remove from `core-js@4`

@@ -13,0 +15,0 @@ require('../proposals/array-grouping-stage-3');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc