core-js-pure
Advanced tools
Comparing version 3.32.2 to 3.33.0
@@ -374,2 +374,3 @@ 'use strict'; | ||
require('../modules/esnext.reflect.metadata'); | ||
require('../modules/esnext.regexp.escape'); | ||
require('../modules/esnext.set.add-all'); | ||
@@ -376,0 +377,0 @@ require('../modules/esnext.set.delete-all'); |
'use strict'; | ||
var parent = require('../../actual/regexp'); | ||
require('../../modules/esnext.regexp.escape'); | ||
module.exports = parent; |
@@ -10,3 +10,3 @@ 'use strict'; | ||
if (isCallable(argument)) return argument; | ||
throw $TypeError(tryToString(argument) + ' is not a function'); | ||
throw new $TypeError(tryToString(argument) + ' is not a function'); | ||
}; |
@@ -10,3 +10,3 @@ 'use strict'; | ||
if (isConstructor(argument)) return argument; | ||
throw $TypeError(tryToString(argument) + ' is not a constructor'); | ||
throw new $TypeError(tryToString(argument) + ' is not a constructor'); | ||
}; |
'use strict'; | ||
var tryToString = require('../internals/try-to-string'); | ||
var $TypeError = TypeError; | ||
// Perform ? RequireInternalSlot(M, [[MapData]]) | ||
module.exports = function (it) { | ||
if (typeof it == 'object' && 'size' in it && 'has' in it && 'get' in it && 'set' in it && 'delete' in it && 'entries' in it) return it; | ||
throw TypeError(tryToString(it) + ' is not a map'); | ||
throw new $TypeError(tryToString(it) + ' is not a map'); | ||
}; |
@@ -9,3 +9,3 @@ 'use strict'; | ||
if (typeof argument == 'object' || isCallable(argument)) return argument; | ||
throw $TypeError("Can't set " + $String(argument) + ' as a prototype'); | ||
throw new $TypeError("Can't set " + $String(argument) + ' as a prototype'); | ||
}; |
'use strict'; | ||
var tryToString = require('../internals/try-to-string'); | ||
var $TypeError = TypeError; | ||
// Perform ? RequireInternalSlot(M, [[SetData]]) | ||
module.exports = function (it) { | ||
if (typeof it == 'object' && 'size' in it && 'has' in it && 'add' in it && 'delete' in it && 'keys' in it) return it; | ||
throw TypeError(tryToString(it) + ' is not a set'); | ||
throw new $TypeError(tryToString(it) + ' is not a set'); | ||
}; |
'use strict'; | ||
var tryToString = require('../internals/try-to-string'); | ||
var $TypeError = TypeError; | ||
// Perform ? RequireInternalSlot(M, [[WeakMapData]]) | ||
module.exports = function (it) { | ||
if (typeof it == 'object' && 'has' in it && 'get' in it && 'set' in it && 'delete') return it; | ||
throw TypeError(tryToString(it) + ' is not a weakmap'); | ||
throw new $TypeError(tryToString(it) + ' is not a weakmap'); | ||
}; |
'use strict'; | ||
var tryToString = require('../internals/try-to-string'); | ||
var $TypeError = TypeError; | ||
// Perform ? RequireInternalSlot(M, [[WeakSetData]]) | ||
module.exports = function (it) { | ||
if (typeof it == 'object' && 'has' in it && 'add' in it && 'delete' in it) return it; | ||
throw TypeError(tryToString(it) + ' is not a weakset'); | ||
throw new $TypeError(tryToString(it) + ' is not a weakset'); | ||
}; |
@@ -8,3 +8,3 @@ 'use strict'; | ||
if (isPrototypeOf(Prototype, it)) return it; | ||
throw $TypeError('Incorrect invocation'); | ||
throw new $TypeError('Incorrect invocation'); | ||
}; |
@@ -10,3 +10,3 @@ 'use strict'; | ||
if (isObject(argument)) return argument; | ||
throw $TypeError($String(argument) + ' is not an object'); | ||
throw new $TypeError($String(argument) + ' is not an object'); | ||
}; |
@@ -26,3 +26,3 @@ 'use strict'; | ||
if (IS_RIGHT ? index < 0 : length <= index) { | ||
throw $TypeError('Reduce of empty array with no initial value'); | ||
throw new $TypeError('Reduce of empty array with no initial value'); | ||
} | ||
@@ -29,0 +29,0 @@ } |
@@ -23,3 +23,3 @@ 'use strict'; | ||
if (isArray(O) && !getOwnPropertyDescriptor(O, 'length').writable) { | ||
throw $TypeError('Cannot set read only .length'); | ||
throw new $TypeError('Cannot set read only .length'); | ||
} return O.length = length; | ||
@@ -26,0 +26,0 @@ } : function (O, length) { |
@@ -13,3 +13,3 @@ 'use strict'; | ||
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex; | ||
if (actualIndex >= len || actualIndex < 0) throw $RangeError('Incorrect index'); | ||
if (actualIndex >= len || actualIndex < 0) throw new $RangeError('Incorrect index'); | ||
var A = new C(len); | ||
@@ -16,0 +16,0 @@ var k = 0; |
@@ -46,3 +46,3 @@ 'use strict'; | ||
} | ||
if (this === $Object && active === root) throw $TypeError('Composite keys must contain a non-primitive component'); | ||
if (this === $Object && active === root) throw new $TypeError('Composite keys must contain a non-primitive component'); | ||
for (i = 0; i < length; i++) { | ||
@@ -49,0 +49,0 @@ if (!isObject(it = arguments[i])) active = active.next(i, it, false); |
@@ -28,3 +28,3 @@ 'use strict'; | ||
})) ? function toISOString() { | ||
if (!$isFinite(thisTimeValue(this))) throw $RangeError('Invalid time value'); | ||
if (!$isFinite(thisTimeValue(this))) throw new $RangeError('Invalid time value'); | ||
var date = this; | ||
@@ -31,0 +31,0 @@ var year = getUTCFullYear(date); |
@@ -12,4 +12,4 @@ 'use strict'; | ||
if (hint === 'string' || hint === 'default') hint = 'string'; | ||
else if (hint !== 'number') throw $TypeError('Incorrect hint'); | ||
else if (hint !== 'number') throw new $TypeError('Incorrect hint'); | ||
return ordinaryToPrimitive(this, hint); | ||
}; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
module.exports = function (O, P) { | ||
if (!delete O[P]) throw $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O)); | ||
if (!delete O[P]) throw new $TypeError('Cannot delete property ' + tryToString(P) + ' of ' + tryToString(O)); | ||
}; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
var TEST = (function (arg) { return String($Error(arg).stack); })('zxcasd'); | ||
var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd'); | ||
// eslint-disable-next-line redos/no-vulnerable -- safe | ||
@@ -10,0 +10,0 @@ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/; |
@@ -6,3 +6,3 @@ 'use strict'; | ||
module.exports = !fails(function () { | ||
var error = Error('a'); | ||
var error = new Error('a'); | ||
if (!('stack' in error)) return true; | ||
@@ -9,0 +9,0 @@ // eslint-disable-next-line es/no-object-defineproperty -- safe |
@@ -13,3 +13,3 @@ 'use strict'; | ||
if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); | ||
throw $TypeError(tryToString(argument) + ' is not iterable'); | ||
throw new $TypeError(tryToString(argument) + ' is not iterable'); | ||
}; |
@@ -36,5 +36,5 @@ 'use strict'; | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (numSize !== numSize) throw $TypeError(INVALID_SIZE); | ||
if (numSize !== numSize) throw new $TypeError(INVALID_SIZE); | ||
var intSize = toIntegerOrInfinity(numSize); | ||
if (intSize < 0) throw $RangeError(INVALID_SIZE); | ||
if (intSize < 0) throw new $RangeError(INVALID_SIZE); | ||
return new SetRecord( | ||
@@ -41,0 +41,0 @@ obj, |
'use strict'; | ||
// IEEE754 conversions based on https://github.com/feross/ieee754 | ||
var sign = require('../internals/math-sign'); | ||
var trunc = require('../internals/math-trunc'); | ||
var $Array = Array; | ||
@@ -13,10 +10,2 @@ var abs = Math.abs; | ||
var roundToEven = function (number) { | ||
var truncated = trunc(number); | ||
var delta = abs(number - truncated); | ||
if (delta > 0.5 || delta === 0.5 && truncated % 2 !== 0) { | ||
return truncated + sign(number); | ||
} return truncated; | ||
}; | ||
var pack = function (number, mantissaLength, bytes) { | ||
@@ -28,3 +17,3 @@ var buffer = $Array(bytes); | ||
var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0; | ||
var s = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0; | ||
var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0; | ||
var index = 0; | ||
@@ -58,6 +47,6 @@ var exponent, mantissa, c; | ||
} else if (exponent + eBias >= 1) { | ||
mantissa = roundToEven((number * c - 1) * pow(2, mantissaLength)); | ||
mantissa = (number * c - 1) * pow(2, mantissaLength); | ||
exponent += eBias; | ||
} else { | ||
mantissa = roundToEven(number * pow(2, eBias - 1) * pow(2, mantissaLength)); | ||
mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength); | ||
exponent = 0; | ||
@@ -78,3 +67,3 @@ } | ||
} | ||
buffer[--index] |= s * 128; | ||
buffer[--index] |= sign * 128; | ||
return buffer; | ||
@@ -90,6 +79,6 @@ }; | ||
var index = bytes - 1; | ||
var s = buffer[index--]; | ||
var exponent = s & 127; | ||
var sign = buffer[index--]; | ||
var exponent = sign & 127; | ||
var mantissa; | ||
s >>= 7; | ||
sign >>= 7; | ||
while (nBits > 0) { | ||
@@ -109,7 +98,7 @@ exponent = exponent * 256 + buffer[index--]; | ||
} else if (exponent === eMax) { | ||
return mantissa ? NaN : s ? -Infinity : Infinity; | ||
return mantissa ? NaN : sign ? -Infinity : Infinity; | ||
} else { | ||
mantissa += pow(2, mantissaLength); | ||
exponent -= eBias; | ||
} return (s ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); | ||
} return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); | ||
}; | ||
@@ -116,0 +105,0 @@ |
@@ -24,3 +24,3 @@ 'use strict'; | ||
if (!isObject(it) || (state = get(it)).type !== TYPE) { | ||
throw TypeError('Incompatible receiver, ' + TYPE + ' required'); | ||
throw new TypeError('Incompatible receiver, ' + TYPE + ' required'); | ||
} return state; | ||
@@ -38,3 +38,3 @@ }; | ||
set = function (it, metadata) { | ||
if (store.has(it)) throw TypeError(OBJECT_ALREADY_INITIALIZED); | ||
if (store.has(it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
@@ -54,3 +54,3 @@ store.set(it, metadata); | ||
set = function (it, metadata) { | ||
if (hasOwn(it, STATE)) throw TypeError(OBJECT_ALREADY_INITIALIZED); | ||
if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); | ||
metadata.facade = it; | ||
@@ -57,0 +57,0 @@ createNonEnumerableProperty(it, STATE, metadata); |
@@ -14,3 +14,3 @@ 'use strict'; | ||
var exec = uncurryThis(constructorRegExp.exec); | ||
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); | ||
var INCORRECT_TO_STRING = !constructorRegExp.test(noop); | ||
@@ -17,0 +17,0 @@ var isConstructorModern = function isConstructor(argument) { |
@@ -49,3 +49,3 @@ 'use strict'; | ||
iterFn = getIteratorMethod(iterable); | ||
if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable'); | ||
if (!iterFn) throw new $TypeError(tryToString(iterable) + ' is not iterable'); | ||
// optimisation for array iterators | ||
@@ -52,0 +52,0 @@ if (isArrayIteratorMethod(iterFn)) { |
@@ -19,3 +19,3 @@ 'use strict'; | ||
if (!isCallable(updateFn) && !isCallable(insertFn)) { | ||
throw $TypeError('At least one callback required'); | ||
throw new $TypeError('At least one callback required'); | ||
} | ||
@@ -22,0 +22,0 @@ if (call(has, map, key)) { |
'use strict'; | ||
var sign = require('../internals/math-sign'); | ||
var floatRound = require('../internals/math-float-round'); | ||
var abs = Math.abs; | ||
var pow = Math.pow; | ||
var EPSILON = pow(2, -52); | ||
var EPSILON32 = pow(2, -23); | ||
var MAX32 = pow(2, 127) * (2 - EPSILON32); | ||
var MIN32 = pow(2, -126); | ||
var FLOAT32_EPSILON = 1.1920928955078125e-7; // 2 ** -23; | ||
var FLOAT32_MAX_VALUE = 3.4028234663852886e+38; // 2 ** 128 - 2 ** 104 | ||
var FLOAT32_MIN_VALUE = 1.1754943508222875e-38; // 2 ** -126; | ||
var roundTiesToEven = function (n) { | ||
return n + 1 / EPSILON - 1 / EPSILON; | ||
}; | ||
// `Math.fround` method implementation | ||
@@ -19,12 +12,3 @@ // https://tc39.es/ecma262/#sec-math.fround | ||
module.exports = Math.fround || function fround(x) { | ||
var n = +x; | ||
var $abs = abs(n); | ||
var $sign = sign(n); | ||
var a, result; | ||
if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; | ||
a = (1 + EPSILON32 / EPSILON) * $abs; | ||
result = a - (a - $abs); | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (result > MAX32 || result !== result) return $sign * Infinity; | ||
return $sign * result; | ||
return floatRound(x, FLOAT32_EPSILON, FLOAT32_MAX_VALUE, FLOAT32_MIN_VALUE); | ||
}; |
@@ -9,3 +9,3 @@ 'use strict'; | ||
this.promise = new C(function ($$resolve, $$reject) { | ||
if (resolve !== undefined || reject !== undefined) throw $TypeError('Bad Promise constructor'); | ||
if (resolve !== undefined || reject !== undefined) throw new $TypeError('Bad Promise constructor'); | ||
resolve = $$resolve; | ||
@@ -12,0 +12,0 @@ reject = $$reject; |
@@ -7,3 +7,3 @@ 'use strict'; | ||
if (it === it) return it; | ||
throw $RangeError('NaN is not allowed'); | ||
throw new $RangeError('NaN is not allowed'); | ||
}; |
@@ -8,4 +8,4 @@ 'use strict'; | ||
if (isRegExp(it)) { | ||
throw $TypeError("The method doesn't accept regular expressions"); | ||
throw new $TypeError("The method doesn't accept regular expressions"); | ||
} return it; | ||
}; |
@@ -22,6 +22,6 @@ 'use strict'; | ||
if (typeof start != type || (end !== Infinity && end !== -Infinity && typeof end != type)) { | ||
throw $TypeError(INCORRECT_RANGE); | ||
throw new $TypeError(INCORRECT_RANGE); | ||
} | ||
if (start === Infinity || start === -Infinity) { | ||
throw $RangeError(INCORRECT_RANGE); | ||
throw new $RangeError(INCORRECT_RANGE); | ||
} | ||
@@ -39,3 +39,3 @@ var ifIncrease = end > start; | ||
} else { | ||
throw $TypeError(INCORRECT_RANGE); | ||
throw new $TypeError(INCORRECT_RANGE); | ||
} | ||
@@ -46,6 +46,6 @@ if (isNullOrUndefined(step)) { | ||
if (typeof step != type) { | ||
throw $TypeError(INCORRECT_RANGE); | ||
throw new $TypeError(INCORRECT_RANGE); | ||
} | ||
if (step === Infinity || step === -Infinity || (step === zero && start !== end)) { | ||
throw $RangeError(INCORRECT_RANGE); | ||
throw new $RangeError(INCORRECT_RANGE); | ||
} | ||
@@ -52,0 +52,0 @@ // eslint-disable-next-line no-self-compare -- NaN check |
@@ -41,5 +41,5 @@ 'use strict'; | ||
} catch (error) { /* empty */ } | ||
if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported'); | ||
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError('Accessors not supported'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
return O; | ||
}; |
@@ -15,3 +15,3 @@ 'use strict'; | ||
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; | ||
throw $TypeError("Can't convert object to primitive value"); | ||
throw new $TypeError("Can't convert object to primitive value"); | ||
}; |
@@ -40,6 +40,6 @@ 'use strict'; | ||
var fourHexDigits = slice(source, i, i + 4); | ||
if (!exec(IS_4_HEX_DIGITS, fourHexDigits)) throw $SyntaxError('Bad Unicode escape at: ' + i); | ||
if (!exec(IS_4_HEX_DIGITS, fourHexDigits)) throw new $SyntaxError('Bad Unicode escape at: ' + i); | ||
value += fromCharCode($parseInt(fourHexDigits, 16)); | ||
i += 4; | ||
} else throw $SyntaxError('Unknown escape sequence: "' + twoChars + '"'); | ||
} else throw new $SyntaxError('Unknown escape sequence: "' + twoChars + '"'); | ||
} else if (chr === '"') { | ||
@@ -50,3 +50,3 @@ unterminated = false; | ||
} else { | ||
if (exec(IS_C0_CONTROL_CODE, chr)) throw $SyntaxError('Bad control character in string literal at: ' + i); | ||
if (exec(IS_C0_CONTROL_CODE, chr)) throw new $SyntaxError('Bad control character in string literal at: ' + i); | ||
value += chr; | ||
@@ -56,4 +56,4 @@ i++; | ||
} | ||
if (unterminated) throw $SyntaxError('Unterminated string at: ' + i); | ||
if (unterminated) throw new $SyntaxError('Unterminated string at: ' + i); | ||
return { value: value, end: i }; | ||
}; |
@@ -20,3 +20,3 @@ 'use strict'; | ||
if (classof(R) === 'RegExp') return call(regexpExec, R, S); | ||
throw $TypeError('RegExp#exec called on incompatible receiver'); | ||
throw new $TypeError('RegExp#exec called on incompatible receiver'); | ||
}; |
@@ -9,4 +9,4 @@ 'use strict'; | ||
module.exports = function (it) { | ||
if (isNullOrUndefined(it)) throw $TypeError("Can't call method on " + it); | ||
if (isNullOrUndefined(it)) throw new $TypeError("Can't call method on " + it); | ||
return it; | ||
}; |
@@ -8,7 +8,7 @@ 'use strict'; | ||
})('versions', []).push({ | ||
version: '3.32.2', | ||
version: '3.33.0', | ||
mode: IS_PURE ? 'pure' : 'global', | ||
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.32.2/LICENSE', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE', | ||
source: 'https://github.com/zloirock/core-js' | ||
}); |
@@ -22,3 +22,3 @@ 'use strict'; | ||
var nextVal = cookedTemplate[i++]; | ||
if (nextVal === undefined) throw $TypeError('Incorrect template'); | ||
if (nextVal === undefined) throw new $TypeError('Incorrect template'); | ||
push(elements, toString(nextVal)); | ||
@@ -25,0 +25,0 @@ if (i === literalSegments) return join(elements, ''); |
@@ -134,3 +134,3 @@ 'use strict'; | ||
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { | ||
throw $RangeError(OVERFLOW_ERROR); | ||
throw new $RangeError(OVERFLOW_ERROR); | ||
} | ||
@@ -144,3 +144,3 @@ | ||
if (currentValue < n && ++delta > maxInt) { | ||
throw $RangeError(OVERFLOW_ERROR); | ||
throw new $RangeError(OVERFLOW_ERROR); | ||
} | ||
@@ -147,0 +147,0 @@ if (currentValue === n) { |
@@ -14,5 +14,5 @@ 'use strict'; | ||
var n = toIntegerOrInfinity(count); | ||
if (n < 0 || n === Infinity) throw $RangeError('Wrong number of repetitions'); | ||
if (n < 0 || n === Infinity) throw new $RangeError('Wrong number of repetitions'); | ||
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; | ||
return result; | ||
}; |
@@ -10,5 +10,5 @@ 'use strict'; | ||
var prim = toPrimitive(argument, 'number'); | ||
if (typeof prim == 'number') throw $TypeError("Can't convert number to bigint"); | ||
if (typeof prim == 'number') throw new $TypeError("Can't convert number to bigint"); | ||
// eslint-disable-next-line es/no-bigint -- safe | ||
return BigInt(prim); | ||
}; |
@@ -13,4 +13,4 @@ 'use strict'; | ||
var length = toLength(number); | ||
if (number !== length) throw $RangeError('Wrong length or index'); | ||
if (number !== length) throw new $RangeError('Wrong length or index'); | ||
return length; | ||
}; |
@@ -8,4 +8,4 @@ 'use strict'; | ||
var result = toIntegerOrInfinity(it); | ||
if (result < 0) throw $RangeError("The argument can't be less than 0"); | ||
if (result < 0) throw new $RangeError("The argument can't be less than 0"); | ||
return result; | ||
}; |
@@ -22,3 +22,3 @@ 'use strict'; | ||
if (!isObject(result) || isSymbol(result)) return result; | ||
throw $TypeError("Can't convert object to primitive value"); | ||
throw new $TypeError("Can't convert object to primitive value"); | ||
} | ||
@@ -25,0 +25,0 @@ if (pref === undefined) pref = 'number'; |
@@ -7,4 +7,4 @@ 'use strict'; | ||
module.exports = function (argument) { | ||
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); | ||
if (classof(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string'); | ||
return $String(argument); | ||
}; |
@@ -5,4 +5,4 @@ 'use strict'; | ||
module.exports = function (passed, required) { | ||
if (passed < required) throw $TypeError('Not enough arguments'); | ||
if (passed < required) throw new $TypeError('Not enough arguments'); | ||
return passed; | ||
}; |
@@ -24,3 +24,3 @@ 'use strict'; | ||
if (setPrototypeOf) { | ||
that = setPrototypeOf($Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype); | ||
that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype); | ||
} else { | ||
@@ -27,0 +27,0 @@ that = isInstance ? this : create(AggregateErrorPrototype); |
@@ -11,3 +11,4 @@ 'use strict'; | ||
var FORCED = Error('e', { cause: 7 }).cause !== 7; | ||
// eslint-disable-next-line es/no-error-cause -- feature detection | ||
var FORCED = new Error('e', { cause: 7 }).cause !== 7; | ||
@@ -14,0 +15,0 @@ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) { |
@@ -41,3 +41,3 @@ 'use strict'; | ||
var first, third, radix, maxCode, digits, length, index, code; | ||
if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number'); | ||
if (isSymbol(it)) throw new TypeError('Cannot convert a Symbol value to a number'); | ||
if (typeof it == 'string' && it.length > 2) { | ||
@@ -44,0 +44,0 @@ it = trim(it); |
@@ -58,3 +58,3 @@ 'use strict'; | ||
// TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation | ||
if (f < 0 || f > 20) throw $RangeError('Incorrect fraction digits'); | ||
if (f < 0 || f > 20) throw new $RangeError('Incorrect fraction digits'); | ||
if (ROUNDS_PROPERLY) return nativeToExponential(x, f); | ||
@@ -61,0 +61,0 @@ var s = ''; |
@@ -86,3 +86,3 @@ 'use strict'; | ||
// TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation | ||
if (fractDigits < 0 || fractDigits > 20) throw $RangeError('Incorrect fraction digits'); | ||
if (fractDigits < 0 || fractDigits > 20) throw new $RangeError('Incorrect fraction digits'); | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
@@ -89,0 +89,0 @@ if (number !== number) return 'NaN'; |
@@ -82,3 +82,3 @@ 'use strict'; | ||
if (result === reaction.promise) { | ||
reject(TypeError('Promise-chain cycle')); | ||
reject(new TypeError('Promise-chain cycle')); | ||
} else if (then = isThenable(result)) { | ||
@@ -173,3 +173,3 @@ call(then, result, resolve, reject); | ||
try { | ||
if (state.facade === value) throw TypeError("Promise can't be resolved itself"); | ||
if (state.facade === value) throw new TypeError("Promise can't be resolved itself"); | ||
var then = isThenable(value); | ||
@@ -176,0 +176,0 @@ if (then) { |
@@ -26,3 +26,3 @@ 'use strict'; | ||
code = +arguments[i++]; | ||
if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw $RangeError(code + ' is not a valid code point'); | ||
if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw new $RangeError(code + ' is not a valid code point'); | ||
elements[i] = code < 0x10000 | ||
@@ -29,0 +29,0 @@ ? fromCharCode(code) |
@@ -89,3 +89,3 @@ 'use strict'; | ||
flags = toString(requireObjectCoercible(getRegExpFlags(regexp))); | ||
if (!~stringIndexOf(flags, 'g')) throw $TypeError('`.matchAll` does not allow non-global regexes'); | ||
if (!~stringIndexOf(flags, 'g')) throw new $TypeError('`.matchAll` does not allow non-global regexes'); | ||
} | ||
@@ -92,0 +92,0 @@ if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll(O, regexp); |
@@ -42,3 +42,3 @@ 'use strict'; | ||
flags = toString(requireObjectCoercible(getRegExpFlags(searchValue))); | ||
if (!~indexOf(flags, 'g')) throw $TypeError('`.replaceAll` does not allow non-global regexes'); | ||
if (!~indexOf(flags, 'g')) throw new $TypeError('`.replaceAll` does not allow non-global regexes'); | ||
} | ||
@@ -45,0 +45,0 @@ replacer = getMethod(searchValue, REPLACE); |
@@ -50,2 +50,3 @@ 'use strict'; | ||
var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE]; | ||
var RangeError = global.RangeError; | ||
var TypeError = global.TypeError; | ||
@@ -67,7 +68,3 @@ var QObject = global.QObject; | ||
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 | ||
var setSymbolDescriptor = DESCRIPTORS && fails(function () { | ||
return nativeObjectCreate(nativeDefineProperty({}, 'a', { | ||
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; } | ||
})).a !== 7; | ||
}) ? function (O, P, Attributes) { | ||
var fallbackDefineProperty = function (O, P, Attributes) { | ||
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); | ||
@@ -79,4 +76,10 @@ if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; | ||
} | ||
} : nativeDefineProperty; | ||
}; | ||
var setSymbolDescriptor = DESCRIPTORS && fails(function () { | ||
return nativeObjectCreate(nativeDefineProperty({}, 'a', { | ||
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; } | ||
})).a !== 7; | ||
}) ? fallbackDefineProperty : nativeDefineProperty; | ||
var wrap = function (tag, description) { | ||
@@ -167,3 +170,3 @@ var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype); | ||
$Symbol = function Symbol() { | ||
if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor'); | ||
if (isPrototypeOf(SymbolPrototype, this)) throw new TypeError('Symbol is not a constructor'); | ||
var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]); | ||
@@ -174,3 +177,9 @@ var tag = uid(description); | ||
if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false; | ||
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value)); | ||
var descriptor = createPropertyDescriptor(1, value); | ||
try { | ||
setSymbolDescriptor(this, tag, descriptor); | ||
} catch (error) { | ||
if (!(error instanceof RangeError)) throw error; | ||
fallbackDefineProperty(this, tag, descriptor); | ||
} | ||
}; | ||
@@ -177,0 +186,0 @@ if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); |
@@ -15,5 +15,5 @@ 'use strict'; | ||
keyFor: function keyFor(sym) { | ||
if (!isSymbol(sym)) throw TypeError(tryToString(sym) + ' is not a symbol'); | ||
if (!isSymbol(sym)) throw new TypeError(tryToString(sym) + ' is not a symbol'); | ||
if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; | ||
} | ||
}); |
@@ -32,3 +32,3 @@ 'use strict'; | ||
var internalState = getAsyncDisposableStackInternalState(stack); | ||
if (internalState.state === DISPOSED) throw $ReferenceError(ASYNC_DISPOSABLE_STACK + ' already disposed'); | ||
if (internalState.state === DISPOSED) throw new $ReferenceError(ASYNC_DISPOSABLE_STACK + ' already disposed'); | ||
return internalState; | ||
@@ -35,0 +35,0 @@ }; |
@@ -17,3 +17,3 @@ 'use strict'; | ||
anInstance(this, AsyncIteratorPrototype); | ||
if (getPrototypeOf(this) === AsyncIteratorPrototype) throw $TypeError('Abstract class AsyncIterator not directly constructable'); | ||
if (getPrototypeOf(this) === AsyncIteratorPrototype) throw new $TypeError('Abstract class AsyncIterator not directly constructable'); | ||
}; | ||
@@ -20,0 +20,0 @@ |
@@ -37,3 +37,3 @@ 'use strict'; | ||
if (anObject(step).done) { | ||
noInitial ? reject($TypeError('Reduce of empty iterator with no initial value')) : resolve(accumulator); | ||
noInitial ? reject(new $TypeError('Reduce of empty iterator with no initial value')) : resolve(accumulator); | ||
} else { | ||
@@ -40,0 +40,0 @@ var value = step.value; |
@@ -31,3 +31,3 @@ 'use strict'; | ||
var internalState = getDisposableStackInternalState(stack); | ||
if (internalState.state === DISPOSED) throw $ReferenceError(DISPOSABLE_STACK + ' already disposed'); | ||
if (internalState.state === DISPOSED) throw new $ReferenceError(DISPOSABLE_STACK + ' already disposed'); | ||
return internalState; | ||
@@ -34,0 +34,0 @@ }; |
@@ -28,3 +28,3 @@ 'use strict'; | ||
anInstance(this, IteratorPrototype); | ||
if (getPrototypeOf(this) === IteratorPrototype) throw $TypeError('Abstract class Iterator not directly constructable'); | ||
if (getPrototypeOf(this) === IteratorPrototype) throw new $TypeError('Abstract class Iterator not directly constructable'); | ||
}; | ||
@@ -31,0 +31,0 @@ |
@@ -14,4 +14,4 @@ 'use strict'; | ||
if (typeof start == 'bigint') return new NumericRangeIterator(start, end, option, 'bigint', BigInt(0), BigInt(1)); | ||
throw $TypeError('Incorrect Iterator.range arguments'); | ||
throw new $TypeError('Incorrect Iterator.range arguments'); | ||
} | ||
}); |
@@ -29,5 +29,5 @@ 'use strict'; | ||
}, { IS_RECORD: true }); | ||
if (noInitial) throw $TypeError('Reduce of empty iterator with no initial value'); | ||
if (noInitial) throw new $TypeError('Reduce of empty iterator with no initial value'); | ||
return accumulator; | ||
} | ||
}); |
@@ -46,3 +46,3 @@ 'use strict'; | ||
if (endIndex < source.length) { | ||
throw SyntaxError('Unexpected extra character: "' + at(source, endIndex) + '" after the parsed data at: ' + endIndex); | ||
throw new SyntaxError('Unexpected extra character: "' + at(source, endIndex) + '" after the parsed data at: ' + endIndex); | ||
} | ||
@@ -123,3 +123,3 @@ return isCallable(reviver) ? internalize({ '': value }, '', reviver, root) : value; | ||
return fork.keyword(null); | ||
} throw SyntaxError('Unexpected character: "' + chr + '" at: ' + i); | ||
} throw new SyntaxError('Unexpected character: "' + chr + '" at: ' + i); | ||
}, | ||
@@ -201,3 +201,3 @@ node: function (type, value, start, end, nodes) { | ||
else if (exec(IS_NON_ZERO_DIGIT, at(source, i))) i = this.skip(IS_DIGIT, ++i); | ||
else throw SyntaxError('Failed to parse number at: ' + i); | ||
else throw new SyntaxError('Failed to parse number at: ' + i); | ||
if (at(source, i) === '.') i = this.skip(IS_DIGIT, ++i); | ||
@@ -209,3 +209,3 @@ if (at(source, i) === 'e' || at(source, i) === 'E') { | ||
i = this.skip(IS_DIGIT, i); | ||
if (exponentStartIndex === i) throw SyntaxError("Failed to parse number's exponent value at: " + i); | ||
if (exponentStartIndex === i) throw new SyntaxError("Failed to parse number's exponent value at: " + i); | ||
} | ||
@@ -218,3 +218,3 @@ return this.node(PRIMITIVE, Number(slice(source, startIndex, i)), startIndex, i); | ||
var endIndex = index + keyword.length; | ||
if (slice(this.source, index, endIndex) !== keyword) throw SyntaxError('Failed to parse value at: ' + index); | ||
if (slice(this.source, index, endIndex) !== keyword) throw new SyntaxError('Failed to parse value at: ' + index); | ||
return this.node(PRIMITIVE, value, index, endIndex); | ||
@@ -231,3 +231,3 @@ }, | ||
for (var j = 0; j < array.length; j++) if (array[j] === chr) return i; | ||
throw SyntaxError('Unexpected character: "' + chr + '" at: ' + i); | ||
throw new SyntaxError('Unexpected character: "' + chr + '" at: ' + i); | ||
} | ||
@@ -234,0 +234,0 @@ }; |
@@ -40,6 +40,6 @@ 'use strict'; | ||
if (jsonString === '' || exec(IS_WHITESPACE, at(jsonString, 0)) || exec(IS_WHITESPACE, at(jsonString, jsonString.length - 1))) { | ||
throw $SyntaxError(ERROR_MESSAGE); | ||
throw new $SyntaxError(ERROR_MESSAGE); | ||
} | ||
var parsed = parse(jsonString); | ||
if (typeof parsed == 'object' && parsed !== null) throw $SyntaxError(ERROR_MESSAGE); | ||
if (typeof parsed == 'object' && parsed !== null) throw new $SyntaxError(ERROR_MESSAGE); | ||
var obj = create(null); | ||
@@ -46,0 +46,0 @@ setInternalState(obj, { type: 'RawJSON' }); |
@@ -25,5 +25,5 @@ 'use strict'; | ||
}); | ||
if (noInitial) throw $TypeError('Reduce of empty map with no initial value'); | ||
if (noInitial) throw new $TypeError('Reduce of empty map with no initial value'); | ||
return accumulator; | ||
} | ||
}); |
@@ -21,3 +21,3 @@ 'use strict'; | ||
if (!isPresentInMap && length < 3) { | ||
throw $TypeError('Updating absent value'); | ||
throw new $TypeError('Updating absent value'); | ||
} | ||
@@ -24,0 +24,0 @@ var value = isPresentInMap ? get(map, key) : aCallable(length > 2 ? arguments[2] : undefined)(key, map); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var IEEE754 = require('../internals/ieee754'); | ||
var f16round = require('../internals/math-f16round'); | ||
var packIEEE754 = IEEE754.pack; | ||
var unpackIEEE754 = IEEE754.unpack; | ||
var $isFinite = isFinite; | ||
// `Math.f16round` method | ||
// https://github.com/tc39/proposal-float16array | ||
$({ target: 'Math', stat: true }, { | ||
f16round: function f16round(x) { | ||
var n = +x; | ||
return $isFinite(n) && n !== 0 ? unpackIEEE754(packIEEE754(n, 10, 2), 10) : n; | ||
} | ||
}); | ||
$({ target: 'Math', stat: true }, { f16round: f16round }); |
@@ -33,5 +33,5 @@ 'use strict'; | ||
var seed = anObject(it).seed; | ||
if (!numberIsFinite(seed)) throw $TypeError(SEED_TYPE_ERROR); | ||
if (!numberIsFinite(seed)) throw new $TypeError(SEED_TYPE_ERROR); | ||
return new $SeededRandomGenerator(seed); | ||
} | ||
}); |
@@ -24,13 +24,13 @@ 'use strict'; | ||
var R, mathNum; | ||
if (typeof string != 'string') throw $TypeError(INVALID_NUMBER_REPRESENTATION); | ||
if (!string.length) throw $SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
if (typeof string != 'string') throw new $TypeError(INVALID_NUMBER_REPRESENTATION); | ||
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
if (charAt(string, 0) === '-') { | ||
sign = -1; | ||
string = stringSlice(string, 1); | ||
if (!string.length) throw $SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
if (!string.length) throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
} | ||
R = radix === undefined ? 10 : toIntegerOrInfinity(radix); | ||
if (R < 2 || R > 36) throw $RangeError(INVALID_RADIX); | ||
if (R < 2 || R > 36) throw new $RangeError(INVALID_RADIX); | ||
if (!exec(valid, string) || numberToString(mathNum = parseInt(string, R), R) !== string) { | ||
throw $SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
throw new $SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
} | ||
@@ -37,0 +37,0 @@ return sign * mathNum; |
@@ -20,3 +20,2 @@ 'use strict'; | ||
var InternalStateModule = require('../internals/internal-state'); | ||
var OBSERVABLE_FORCED = require('../internals/observable-forced'); | ||
@@ -185,3 +184,3 @@ var $$OBSERVABLE = wellKnownSymbol('observable'); | ||
$({ global: true, constructor: true, forced: OBSERVABLE_FORCED }, { | ||
$({ global: true, constructor: true, forced: true }, { | ||
Observable: $Observable | ||
@@ -188,0 +187,0 @@ }); |
@@ -11,3 +11,2 @@ 'use strict'; | ||
var wellKnownSymbol = require('../internals/well-known-symbol'); | ||
var OBSERVABLE_FORCED = require('../internals/observable-forced'); | ||
@@ -18,3 +17,3 @@ var $$OBSERVABLE = wellKnownSymbol('observable'); | ||
// https://github.com/tc39/proposal-observable | ||
$({ target: 'Observable', stat: true, forced: OBSERVABLE_FORCED }, { | ||
$({ target: 'Observable', stat: true, forced: true }, { | ||
from: function from(x) { | ||
@@ -21,0 +20,0 @@ var C = isConstructor(this) ? this : getBuiltIn('Observable'); |
@@ -5,3 +5,2 @@ 'use strict'; | ||
var isConstructor = require('../internals/is-constructor'); | ||
var OBSERVABLE_FORCED = require('../internals/observable-forced'); | ||
@@ -12,3 +11,3 @@ var Array = getBuiltIn('Array'); | ||
// https://github.com/tc39/proposal-observable | ||
$({ target: 'Observable', stat: true, forced: OBSERVABLE_FORCED }, { | ||
$({ target: 'Observable', stat: true, forced: true }, { | ||
of: function of() { | ||
@@ -15,0 +14,0 @@ var C = isConstructor(this) ? this : getBuiltIn('Observable'); |
@@ -25,5 +25,5 @@ 'use strict'; | ||
}); | ||
if (noInitial) throw $TypeError('Reduce of empty set with no initial value'); | ||
if (noInitial) throw new $TypeError('Reduce of empty set with no initial value'); | ||
return accumulator; | ||
} | ||
}); |
@@ -50,3 +50,3 @@ 'use strict'; | ||
// https://github.com/tc39/proposal-string-dedent/issues/75 | ||
if (FREEZING && !isFrozen(rawInput)) throw $TypeError('Raw template should be frozen'); | ||
if (FREEZING && !isFrozen(rawInput)) throw new $TypeError('Raw template should be frozen'); | ||
if (globalDedentRegistry.has(rawInput)) return globalDedentRegistry.get(rawInput); | ||
@@ -71,3 +71,3 @@ var raw = dedentStringsArray(rawInput); | ||
if (!length) throw $TypeError(INVALID_TAG); | ||
if (!length) throw new $TypeError(INVALID_TAG); | ||
@@ -77,3 +77,3 @@ for (; i < length; i++) { | ||
if (typeof element == 'string') blocks[i] = split(element, NEW_LINE); | ||
else throw $TypeError(INVALID_TAG); | ||
else throw new $TypeError(INVALID_TAG); | ||
} | ||
@@ -86,3 +86,3 @@ | ||
if (lines.length === 1 || lines[0].length > 0) { | ||
throw $TypeError(INVALID_OPENING_LINE); | ||
throw new $TypeError(INVALID_OPENING_LINE); | ||
} | ||
@@ -93,3 +93,3 @@ lines[1] = ''; | ||
if (lines.length === 1 || exec(NON_WHITESPACE, lines[lines.length - 1])) { | ||
throw $TypeError(INVALID_CLOSING_LINE); | ||
throw new $TypeError(INVALID_CLOSING_LINE); | ||
} | ||
@@ -96,0 +96,0 @@ lines[lines.length - 2] = ''; |
@@ -21,3 +21,3 @@ 'use strict'; | ||
if (setPrototypeOf) { | ||
that = setPrototypeOf($Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype); | ||
that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : SuppressedErrorPrototype); | ||
} else { | ||
@@ -24,0 +24,0 @@ that = isInstance ? this : create(SuppressedErrorPrototype); |
@@ -40,3 +40,3 @@ 'use strict'; | ||
var getInternalState = InternalStateModule.getterFor(DOM_EXCEPTION); | ||
var HAS_STACK = 'stack' in Error(DOM_EXCEPTION); | ||
var HAS_STACK = 'stack' in new Error(DOM_EXCEPTION); | ||
@@ -65,3 +65,3 @@ var codeFor = function (name) { | ||
if (HAS_STACK) { | ||
var error = Error(message); | ||
var error = new Error(message); | ||
error.name = DOM_EXCEPTION; | ||
@@ -68,0 +68,0 @@ defineProperty(this, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1))); |
@@ -26,3 +26,3 @@ 'use strict'; | ||
var that = new NativeDOMException(message, name); | ||
var error = Error(message); | ||
var error = new Error(message); | ||
error.name = DOM_EXCEPTION; | ||
@@ -36,3 +36,3 @@ defineProperty(that, 'stack', createPropertyDescriptor(1, clearErrorStack(error.stack, 1))); | ||
var ERROR_HAS_STACK = 'stack' in Error(DOM_EXCEPTION); | ||
var ERROR_HAS_STACK = 'stack' in new Error(DOM_EXCEPTION); | ||
var DOM_EXCEPTION_HAS_STACK = 'stack' in new NativeDOMException(1, 2); | ||
@@ -39,0 +39,0 @@ |
@@ -25,4 +25,5 @@ 'use strict'; | ||
var SetHelpers = require('../internals/set-helpers'); | ||
var arrayBufferTransfer = require('../internals/array-buffer-transfer'); | ||
var ERROR_STACK_INSTALLABLE = require('../internals/error-stack-installable'); | ||
var PROPER_TRANSFER = require('../internals/structured-clone-proper-transfer'); | ||
var PROPER_STRUCTURED_CLONE_TRANSFER = require('../internals/structured-clone-proper-transfer'); | ||
@@ -234,33 +235,33 @@ var Object = global.Object; | ||
case 'AggregateError': | ||
cloned = getBuiltin('AggregateError')([]); | ||
cloned = new (getBuiltin('AggregateError'))([]); | ||
break; | ||
case 'EvalError': | ||
cloned = EvalError(); | ||
cloned = new EvalError(); | ||
break; | ||
case 'RangeError': | ||
cloned = RangeError(); | ||
cloned = new RangeError(); | ||
break; | ||
case 'ReferenceError': | ||
cloned = ReferenceError(); | ||
cloned = new ReferenceError(); | ||
break; | ||
case 'SyntaxError': | ||
cloned = SyntaxError(); | ||
cloned = new SyntaxError(); | ||
break; | ||
case 'TypeError': | ||
cloned = TypeError(); | ||
cloned = new TypeError(); | ||
break; | ||
case 'URIError': | ||
cloned = URIError(); | ||
cloned = new URIError(); | ||
break; | ||
case 'CompileError': | ||
cloned = CompileError(); | ||
cloned = new CompileError(); | ||
break; | ||
case 'LinkError': | ||
cloned = LinkError(); | ||
cloned = new LinkError(); | ||
break; | ||
case 'RuntimeError': | ||
cloned = RuntimeError(); | ||
cloned = new RuntimeError(); | ||
break; | ||
default: | ||
cloned = Error(); | ||
cloned = new Error(); | ||
} | ||
@@ -528,3 +529,3 @@ break; | ||
var tryToTransfer = function (rawTransfer, map) { | ||
if (!isObject(rawTransfer)) throw TypeError('Transfer option cannot be converted to a sequence'); | ||
if (!isObject(rawTransfer)) throw new TypeError('Transfer option cannot be converted to a sequence'); | ||
@@ -554,3 +555,3 @@ var transfer = []; | ||
if (PROPER_TRANSFER) { | ||
if (PROPER_STRUCTURED_CLONE_TRANSFER) { | ||
transferred = nativeStructuredClone(value, { transfer: [value] }); | ||
@@ -603,4 +604,4 @@ } else switch (type) { | ||
if (PROPER_TRANSFER) { | ||
transferred = nativeStructuredClone(value, { transfer: [value] }); | ||
if (arrayBufferTransfer) { | ||
transferred = arrayBufferTransfer(value, undefined, true); | ||
} else { | ||
@@ -617,3 +618,3 @@ if (!isCallable(value.transfer)) throwUnpolyfillable('ArrayBuffer', TRANSFERRING); | ||
// https://html.spec.whatwg.org/multipage/structured-data.html#dom-structuredclone | ||
$({ global: true, enumerable: true, sham: !PROPER_TRANSFER, forced: FORCED_REPLACEMENT }, { | ||
$({ global: true, enumerable: true, sham: !PROPER_STRUCTURED_CLONE_TRANSFER, forced: FORCED_REPLACEMENT }, { | ||
structuredClone: function structuredClone(value /* , { transfer } */) { | ||
@@ -620,0 +621,0 @@ var options = validateArgumentsLength(arguments.length, 1) > 1 && !isNullOrUndefined(arguments[1]) ? anObject(arguments[1]) : undefined; |
@@ -159,3 +159,3 @@ 'use strict'; | ||
!call(entryNext, entryIterator).done | ||
) throw TypeError('Expected sequence with length 2'); | ||
) throw new TypeError('Expected sequence with length 2'); | ||
push(this.entries, { key: $toString(first.value), value: $toString(second.value) }); | ||
@@ -162,0 +162,0 @@ } |
@@ -323,3 +323,3 @@ 'use strict'; | ||
failure = this.parse(urlString); | ||
if (failure) throw TypeError(failure); | ||
if (failure) throw new TypeError(failure); | ||
this.searchParams = null; | ||
@@ -329,3 +329,3 @@ } else { | ||
failure = this.parse(urlString, null, baseState); | ||
if (failure) throw TypeError(failure); | ||
if (failure) throw new TypeError(failure); | ||
searchParams = getInternalSearchParamsState(new URLSearchParams()); | ||
@@ -819,3 +819,3 @@ searchParams.bindURL(this); | ||
var failure = this.parse(href); | ||
if (failure) throw TypeError(failure); | ||
if (failure) throw new TypeError(failure); | ||
this.searchParams.update(); | ||
@@ -822,0 +822,0 @@ }, |
{ | ||
"name": "core-js-pure", | ||
"version": "3.32.2", | ||
"version": "3.33.0", | ||
"description": "Standard library", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
'use strict'; | ||
/* eslint-disable node/no-sync -- avoiding overcomplicating */ | ||
/* eslint-disable unicorn/prefer-node-protocol -- ancient env possible */ | ||
var fs = require('fs'); | ||
@@ -4,0 +5,0 @@ var os = require('os'); |
@@ -8,2 +8,3 @@ 'use strict'; | ||
require('../proposals/map-upsert-stage-2'); | ||
require('../proposals/regexp-escaping'); | ||
require('../proposals/string-dedent'); | ||
@@ -10,0 +11,0 @@ require('../proposals/symbol-predicates-v2'); |
1061734
3410
26886