core-js-pure
Advanced tools
Comparing version 3.22.7 to 3.22.8
@@ -1,3 +0,3 @@ | ||
var parent = require('../../stable/typed-array/every'); | ||
var parent = require('../../stable/typed-array/at'); | ||
module.exports = parent; |
@@ -1,2 +0,2 @@ | ||
var parent = require('../../actual/typed-array/every'); | ||
var parent = require('../../actual/typed-array/at'); | ||
@@ -3,0 +3,0 @@ // TODO: Remove from `core-js@4` |
@@ -1,6 +0,5 @@ | ||
var global = require('../internals/global'); | ||
var isCallable = require('../internals/is-callable'); | ||
var tryToString = require('../internals/try-to-string'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -10,3 +9,3 @@ // `Assert: IsCallable(argument) is true` | ||
if (isCallable(argument)) return argument; | ||
throw TypeError(tryToString(argument) + ' is not a function'); | ||
throw $TypeError(tryToString(argument) + ' is not a function'); | ||
}; |
@@ -1,6 +0,5 @@ | ||
var global = require('../internals/global'); | ||
var isConstructor = require('../internals/is-constructor'); | ||
var tryToString = require('../internals/try-to-string'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -10,3 +9,3 @@ // `Assert: IsConstructor(argument) is true` | ||
if (isConstructor(argument)) return argument; | ||
throw TypeError(tryToString(argument) + ' is not a constructor'); | ||
throw $TypeError(tryToString(argument) + ' is not a constructor'); | ||
}; |
@@ -1,10 +0,9 @@ | ||
var global = require('../internals/global'); | ||
var isCallable = require('../internals/is-callable'); | ||
var String = global.String; | ||
var TypeError = global.TypeError; | ||
var $String = String; | ||
var $TypeError = TypeError; | ||
module.exports = function (argument) { | ||
if (typeof argument == 'object' || isCallable(argument)) return argument; | ||
throw TypeError("Can't set " + String(argument) + ' as a prototype'); | ||
throw $TypeError("Can't set " + $String(argument) + ' as a prototype'); | ||
}; |
@@ -1,9 +0,8 @@ | ||
var global = require('../internals/global'); | ||
var isPrototypeOf = require('../internals/object-is-prototype-of'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
module.exports = function (it, Prototype) { | ||
if (isPrototypeOf(Prototype, it)) return it; | ||
throw TypeError('Incorrect invocation'); | ||
throw $TypeError('Incorrect invocation'); | ||
}; |
@@ -1,6 +0,5 @@ | ||
var global = require('../internals/global'); | ||
var isObject = require('../internals/is-object'); | ||
var String = global.String; | ||
var TypeError = global.TypeError; | ||
var $String = String; | ||
var $TypeError = TypeError; | ||
@@ -10,3 +9,3 @@ // `Assert: Type(argument) is Object` | ||
if (isObject(argument)) return argument; | ||
throw TypeError(String(argument) + ' is not an object'); | ||
throw $TypeError($String(argument) + ' is not an object'); | ||
}; |
@@ -5,2 +5,3 @@ 'use strict'; | ||
var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var deletePropertyOrThrow = require('../internals/delete-property-or-throw'); | ||
@@ -27,3 +28,3 @@ var min = Math.min; | ||
if (from in O) O[to] = O[from]; | ||
else delete O[to]; | ||
else deletePropertyOrThrow(O, to); | ||
to += inc; | ||
@@ -30,0 +31,0 @@ from += inc; |
'use strict'; | ||
var global = require('../internals/global'); | ||
var bind = require('../internals/function-bind-context'); | ||
@@ -14,3 +13,3 @@ var call = require('../internals/function-call'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
@@ -30,3 +29,3 @@ // `Array.from` method implementation | ||
// if the target is not iterable or it's an array with the default iterator - use a simple case | ||
if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) { | ||
if (iteratorMethod && !(this === $Array && isArrayIteratorMethod(iteratorMethod))) { | ||
iterator = getIterator(O, iteratorMethod); | ||
@@ -41,3 +40,3 @@ next = iterator.next; | ||
length = lengthOfArrayLike(O); | ||
result = IS_CONSTRUCTOR ? new this(length) : Array(length); | ||
result = IS_CONSTRUCTOR ? new this(length) : $Array(length); | ||
for (;length > index; index++) { | ||
@@ -44,0 +43,0 @@ value = mapping ? mapfn(O[index], index) : O[index]; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var bind = require('../internals/function-bind-context'); | ||
@@ -11,3 +10,3 @@ var uncurryThis = require('../internals/function-uncurry-this'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
var push = uncurryThis([].push); | ||
@@ -34,3 +33,3 @@ | ||
Constructor = specificConstructor(O); | ||
if (Constructor !== Array) { | ||
if (Constructor !== $Array) { | ||
for (key in target) target[key] = arrayFromConstructorAndList(Constructor, target[key]); | ||
@@ -37,0 +36,0 @@ } |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var aCallable = require('../internals/a-callable'); | ||
@@ -7,3 +6,3 @@ var toObject = require('../internals/to-object'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -27,3 +26,3 @@ // `Array.prototype.{ reduce, reduceRight }` methods implementation | ||
if (IS_RIGHT ? index < 0 : length <= index) { | ||
throw TypeError('Reduce of empty array with no initial value'); | ||
throw $TypeError('Reduce of empty array with no initial value'); | ||
} | ||
@@ -30,0 +29,0 @@ } |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var toAbsoluteIndex = require('../internals/to-absolute-index'); | ||
@@ -6,3 +5,3 @@ var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
var max = Math.max; | ||
@@ -14,3 +13,3 @@ | ||
var fin = toAbsoluteIndex(end === undefined ? length : end, length); | ||
var result = Array(max(fin - k, 0)); | ||
var result = $Array(max(fin - k, 0)); | ||
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]); | ||
@@ -17,0 +16,0 @@ result.length = n; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var isArray = require('../internals/is-array'); | ||
@@ -8,3 +7,3 @@ var isConstructor = require('../internals/is-constructor'); | ||
var SPECIES = wellKnownSymbol('species'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
@@ -18,3 +17,3 @@ // a part of `ArraySpeciesCreate` abstract operation | ||
// cross-realm fallback | ||
if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined; | ||
if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined; | ||
else if (isObject(C)) { | ||
@@ -24,3 +23,3 @@ C = C[SPECIES]; | ||
} | ||
} return C === undefined ? Array : C; | ||
} return C === undefined ? $Array : C; | ||
}; |
var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer'); | ||
var toAbsoluteIndex = require('../internals/to-absolute-index'); | ||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var $TypeError = TypeError; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; | ||
@@ -29,4 +28,3 @@ // https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.toSpliced | ||
} | ||
newLen = len + insertCount - actualDeleteCount; | ||
if (newLen > MAX_SAFE_INTEGER) throw $TypeError('Maximum allowed length exceeded'); | ||
newLen = doesNotExceedSafeInteger(len + insertCount - actualDeleteCount); | ||
A = new C(newLen); | ||
@@ -33,0 +31,0 @@ |
@@ -1,6 +0,5 @@ | ||
var global = require('../internals/global'); | ||
var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var RangeError = global.RangeError; | ||
var $RangeError = RangeError; | ||
@@ -13,3 +12,3 @@ // https://tc39.es/proposal-change-array-by-copy/#sec-array.prototype.with | ||
var actualIndex = relativeIndex < 0 ? len + relativeIndex : relativeIndex; | ||
if (actualIndex >= len || actualIndex < 0) throw RangeError('Incorrect index'); | ||
if (actualIndex >= len || actualIndex < 0) throw $RangeError('Incorrect index'); | ||
var A = new C(len); | ||
@@ -16,0 +15,0 @@ var k = 0; |
'use strict'; | ||
// https://github.com/tc39/proposal-iterator-helpers | ||
// https://github.com/tc39/proposal-array-from-async | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
var aCallable = require('../internals/a-callable'); | ||
var anObject = require('../internals/an-object'); | ||
var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer'); | ||
var getBuiltIn = require('../internals/get-built-in'); | ||
var getMethod = require('../internals/get-method'); | ||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; | ||
var TypeError = global.TypeError; | ||
var createMethod = function (TYPE) { | ||
@@ -49,5 +46,3 @@ var IS_TO_ARRAY = TYPE == 0; | ||
try { | ||
if (IS_TO_ARRAY && (index > MAX_SAFE_INTEGER) && MAPPING) { | ||
throw TypeError('The allowed number of iterations has been exceeded'); | ||
} | ||
if (IS_TO_ARRAY && MAPPING) doesNotExceedSafeInteger(index); | ||
Promise.resolve(anObject(call(next, iterator))).then(function (step) { | ||
@@ -54,0 +49,0 @@ try { |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support'); | ||
@@ -8,3 +7,3 @@ var isCallable = require('../internals/is-callable'); | ||
var TO_STRING_TAG = wellKnownSymbol('toStringTag'); | ||
var Object = global.Object; | ||
var $Object = Object; | ||
@@ -26,3 +25,3 @@ // ES3 wrong here | ||
// @@toStringTag case | ||
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag | ||
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag | ||
// builtinTag case | ||
@@ -29,0 +28,0 @@ : CORRECT_ARGUMENTS ? classofRaw(O) |
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env` | ||
require('../modules/es.map'); | ||
require('../modules/es.weak-map'); | ||
var global = require('../internals/global'); | ||
var getBuiltIn = require('../internals/get-built-in'); | ||
@@ -9,4 +8,4 @@ var create = require('../internals/object-create'); | ||
var Object = global.Object; | ||
var TypeError = global.TypeError; | ||
var $Object = Object; | ||
var $TypeError = TypeError; | ||
var Map = getBuiltIn('Map'); | ||
@@ -47,3 +46,3 @@ var WeakMap = getBuiltIn('WeakMap'); | ||
} | ||
if (this === Object && active === root) throw TypeError('Composite keys must contain a non-primitive component'); | ||
if (this === $Object && active === root) throw $TypeError('Composite keys must contain a non-primitive component'); | ||
for (i = 0; i < length; i++) { | ||
@@ -50,0 +49,0 @@ if (!isObject(it = arguments[i])) active = active.next(i, it, false); |
'use strict'; | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -7,3 +6,3 @@ var fails = require('../internals/fails'); | ||
var RangeError = global.RangeError; | ||
var $RangeError = RangeError; | ||
var abs = Math.abs; | ||
@@ -29,3 +28,3 @@ var DatePrototype = Date.prototype; | ||
})) ? function toISOString() { | ||
if (!isFinite(getTime(this))) throw RangeError('Invalid time value'); | ||
if (!isFinite(getTime(this))) throw $RangeError('Invalid time value'); | ||
var date = this; | ||
@@ -32,0 +31,0 @@ var year = getUTCFullYear(date); |
'use strict'; | ||
var global = require('../internals/global'); | ||
var anObject = require('../internals/an-object'); | ||
var ordinaryToPrimitive = require('../internals/ordinary-to-primitive'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -13,4 +12,4 @@ // `Date.prototype[@@toPrimitive](hint)` method implementation | ||
if (hint === 'string' || hint === 'default') hint = 'string'; | ||
else if (hint !== 'number') throw TypeError('Incorrect hint'); | ||
else if (hint !== 'number') throw $TypeError('Incorrect hint'); | ||
return ordinaryToPrimitive(this, hint); | ||
}; |
'use strict'; | ||
var global = require('../internals/global'); | ||
var isArray = require('../internals/is-array'); | ||
var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer'); | ||
var bind = require('../internals/function-bind-context'); | ||
var TypeError = global.TypeError; | ||
// `FlattenIntoArray` abstract operation | ||
@@ -25,3 +23,3 @@ // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray | ||
} else { | ||
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length'); | ||
doesNotExceedSafeInteger(targetIndex + 1); | ||
target[targetIndex] = element; | ||
@@ -28,0 +26,0 @@ } |
'use strict'; | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -10,3 +9,3 @@ var aCallable = require('../internals/a-callable'); | ||
var Function = global.Function; | ||
var $Function = Function; | ||
var concat = uncurryThis([].concat); | ||
@@ -19,3 +18,3 @@ var join = uncurryThis([].join); | ||
for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; | ||
factories[argsLength] = Function('C,a', 'return new C(' + join(list, ',') + ')'); | ||
factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')'); | ||
} return factories[argsLength](C, args); | ||
@@ -26,3 +25,3 @@ }; | ||
// https://tc39.es/ecma262/#sec-function.prototype.bind | ||
module.exports = NATIVE_BIND ? Function.bind : function bind(that /* , ...args */) { | ||
module.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) { | ||
var F = aCallable(this); | ||
@@ -29,0 +28,0 @@ var Prototype = F.prototype; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -8,3 +7,3 @@ var aCallable = require('../internals/a-callable'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -14,3 +13,3 @@ module.exports = function (argument, usingIterator) { | ||
if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); | ||
throw TypeError(tryToString(argument) + ' is not iterable'); | ||
throw $TypeError(tryToString(argument) + ' is not iterable'); | ||
}; |
// IEEE754 conversions based on https://github.com/feross/ieee754 | ||
var global = require('../internals/global'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
var abs = Math.abs; | ||
@@ -12,3 +10,3 @@ var pow = Math.pow; | ||
var pack = function (number, mantissaLength, bytes) { | ||
var buffer = Array(bytes); | ||
var buffer = $Array(bytes); | ||
var exponentLength = bytes * 8 - mantissaLength - 1; | ||
@@ -15,0 +13,0 @@ var eMax = (1 << exponentLength) - 1; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -6,3 +5,3 @@ var fails = require('../internals/fails'); | ||
var Object = global.Object; | ||
var $Object = Object; | ||
var split = uncurryThis(''.split); | ||
@@ -14,5 +13,5 @@ | ||
// eslint-disable-next-line no-prototype-builtins -- safe | ||
return !Object('z').propertyIsEnumerable(0); | ||
return !$Object('z').propertyIsEnumerable(0); | ||
}) ? function (it) { | ||
return classof(it) == 'String' ? split(it, '') : Object(it); | ||
} : Object; | ||
return classof(it) == 'String' ? split(it, '') : $Object(it); | ||
} : $Object; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var classof = require('../internals/classof'); | ||
@@ -8,6 +7,6 @@ var hasOwn = require('../internals/has-own-property'); | ||
var ITERATOR = wellKnownSymbol('iterator'); | ||
var Object = global.Object; | ||
var $Object = Object; | ||
module.exports = function (it) { | ||
var O = Object(it); | ||
var O = $Object(it); | ||
return O[ITERATOR] !== undefined | ||
@@ -14,0 +13,0 @@ || '@@iterator' in O |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var getBuiltIn = require('../internals/get-built-in'); | ||
@@ -7,3 +6,3 @@ var isCallable = require('../internals/is-callable'); | ||
var Object = global.Object; | ||
var $Object = Object; | ||
@@ -14,3 +13,3 @@ module.exports = USE_SYMBOL_AS_UID ? function (it) { | ||
var $Symbol = getBuiltIn('Symbol'); | ||
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it)); | ||
return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, $Object(it)); | ||
}; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var bind = require('../internals/function-bind-context'); | ||
@@ -13,3 +12,3 @@ var call = require('../internals/function-call'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -47,3 +46,3 @@ var Result = function (stopped, result) { | ||
iterFn = getIteratorMethod(iterable); | ||
if (!iterFn) throw TypeError(tryToString(iterable) + ' is not iterable'); | ||
if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable'); | ||
// optimisation for array iterators | ||
@@ -50,0 +49,0 @@ if (isArrayIteratorMethod(iterFn)) { |
'use strict'; | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -8,3 +7,3 @@ var aCallable = require('../internals/a-callable'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -21,3 +20,3 @@ // `Map.prototype.upsert` method | ||
if (!isCallable(updateFn) && !isCallable(insertFn)) { | ||
throw TypeError('At least one callback required'); | ||
throw $TypeError('At least one callback required'); | ||
} | ||
@@ -24,0 +23,0 @@ if (call(has, map, key)) { |
@@ -1,10 +0,9 @@ | ||
var global = require('../internals/global'); | ||
var isRegExp = require('../internals/is-regexp'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
module.exports = function (it) { | ||
if (isRegExp(it)) { | ||
throw TypeError("The method doesn't accept regular expressions"); | ||
throw $TypeError("The method doesn't accept regular expressions"); | ||
} return it; | ||
}; |
'use strict'; | ||
var global = require('../internals/global'); | ||
var InternalStateModule = require('../internals/internal-state'); | ||
@@ -15,11 +14,11 @@ var createIteratorConstructor = require('../internals/create-iterator-constructor'); | ||
var RangeError = global.RangeError; | ||
var TypeError = global.TypeError; | ||
var $RangeError = RangeError; | ||
var $TypeError = TypeError; | ||
var $RangeIterator = createIteratorConstructor(function NumericRangeIterator(start, end, option, type, zero, one) { | ||
if (typeof start != type || (end !== Infinity && end !== -Infinity && typeof end != type)) { | ||
throw new TypeError(INCORRECT_RANGE); | ||
throw new $TypeError(INCORRECT_RANGE); | ||
} | ||
if (start === Infinity || start === -Infinity) { | ||
throw new RangeError(INCORRECT_RANGE); | ||
throw new $RangeError(INCORRECT_RANGE); | ||
} | ||
@@ -37,3 +36,3 @@ var ifIncrease = end > start; | ||
} else { | ||
throw new TypeError(INCORRECT_RANGE); | ||
throw new $TypeError(INCORRECT_RANGE); | ||
} | ||
@@ -44,6 +43,6 @@ if (step == null) { | ||
if (typeof step != type) { | ||
throw new TypeError(INCORRECT_RANGE); | ||
throw new $TypeError(INCORRECT_RANGE); | ||
} | ||
if (step === Infinity || step === -Infinity || (step === zero && start !== end)) { | ||
throw new RangeError(INCORRECT_RANGE); | ||
throw new $RangeError(INCORRECT_RANGE); | ||
} | ||
@@ -50,0 +49,0 @@ // eslint-disable-next-line no-self-compare -- NaN check |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var DESCRIPTORS = require('../internals/descriptors'); | ||
@@ -8,3 +7,3 @@ var IE8_DOM_DEFINE = require('../internals/ie8-dom-define'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
// eslint-disable-next-line es-x/no-object-defineproperty -- safe | ||
@@ -42,5 +41,5 @@ var $defineProperty = Object.defineProperty; | ||
} catch (error) { /* empty */ } | ||
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); | ||
if ('get' in Attributes || 'set' in Attributes) throw $TypeError('Accessors not supported'); | ||
if ('value' in Attributes) O[P] = Attributes.value; | ||
return O; | ||
}; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var hasOwn = require('../internals/has-own-property'); | ||
@@ -9,8 +8,9 @@ var isCallable = require('../internals/is-callable'); | ||
var IE_PROTO = sharedKey('IE_PROTO'); | ||
var Object = global.Object; | ||
var ObjectPrototype = Object.prototype; | ||
var $Object = Object; | ||
var ObjectPrototype = $Object.prototype; | ||
// `Object.getPrototypeOf` method | ||
// https://tc39.es/ecma262/#sec-object.getprototypeof | ||
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { | ||
// eslint-disable-next-line es-x/no-object-getprototypeof -- safe | ||
module.exports = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) { | ||
var object = toObject(O); | ||
@@ -21,3 +21,3 @@ if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; | ||
return constructor.prototype; | ||
} return object instanceof Object ? ObjectPrototype : null; | ||
} return object instanceof $Object ? ObjectPrototype : null; | ||
}; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -6,3 +5,3 @@ var isCallable = require('../internals/is-callable'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -16,3 +15,3 @@ // `OrdinaryToPrimitive` abstract operation | ||
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; | ||
throw TypeError("Can't convert object to primitive value"); | ||
throw $TypeError("Can't convert object to primitive value"); | ||
}; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -8,3 +7,3 @@ var anObject = require('../internals/an-object'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -21,3 +20,3 @@ // `RegExpExec` abstract operation | ||
if (classof(R) === 'RegExp') return call(regexpExec, R, S); | ||
throw TypeError('RegExp#exec called on incompatible receiver'); | ||
throw $TypeError('RegExp#exec called on incompatible receiver'); | ||
}; |
@@ -1,10 +0,8 @@ | ||
var global = require('../internals/global'); | ||
var $TypeError = TypeError; | ||
var TypeError = global.TypeError; | ||
// `RequireObjectCoercible` abstract operation | ||
// https://tc39.es/ecma262/#sec-requireobjectcoercible | ||
module.exports = function (it) { | ||
if (it == undefined) throw TypeError("Can't call method on " + it); | ||
if (it == undefined) throw $TypeError("Can't call method on " + it); | ||
return it; | ||
}; |
@@ -7,7 +7,7 @@ var IS_PURE = require('../internals/is-pure'); | ||
})('versions', []).push({ | ||
version: '3.22.7', | ||
version: '3.22.8', | ||
mode: IS_PURE ? 'pure' : 'global', | ||
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.22.7/LICENSE', | ||
license: 'https://github.com/zloirock/core-js/blob/v3.22.8/LICENSE', | ||
source: 'https://github.com/zloirock/core-js' | ||
}); |
'use strict'; | ||
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -20,3 +19,3 @@ | ||
var RangeError = global.RangeError; | ||
var $RangeError = RangeError; | ||
var exec = uncurryThis(regexSeparators.exec); | ||
@@ -136,3 +135,3 @@ var floor = Math.floor; | ||
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) { | ||
throw RangeError(OVERFLOW_ERROR); | ||
throw $RangeError(OVERFLOW_ERROR); | ||
} | ||
@@ -146,3 +145,3 @@ | ||
if (currentValue < n && ++delta > maxInt) { | ||
throw RangeError(OVERFLOW_ERROR); | ||
throw $RangeError(OVERFLOW_ERROR); | ||
} | ||
@@ -149,0 +148,0 @@ if (currentValue == n) { |
'use strict'; | ||
var global = require('../internals/global'); | ||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
@@ -7,3 +6,3 @@ var toString = require('../internals/to-string'); | ||
var RangeError = global.RangeError; | ||
var $RangeError = RangeError; | ||
@@ -16,5 +15,5 @@ // `String.prototype.repeat` method implementation | ||
var n = toIntegerOrInfinity(count); | ||
if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); | ||
if (n < 0 || n == Infinity) throw $RangeError('Wrong number of repetitions'); | ||
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; | ||
return result; | ||
}; |
@@ -1,6 +0,5 @@ | ||
var global = require('../internals/global'); | ||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var toLength = require('../internals/to-length'); | ||
var RangeError = global.RangeError; | ||
var $RangeError = RangeError; | ||
@@ -13,4 +12,4 @@ // `ToIndex` abstract operation | ||
var length = toLength(number); | ||
if (number !== length) throw RangeError('Wrong length or index'); | ||
if (number !== length) throw $RangeError('Wrong length or index'); | ||
return length; | ||
}; |
@@ -1,5 +0,4 @@ | ||
var global = require('../internals/global'); | ||
var requireObjectCoercible = require('../internals/require-object-coercible'); | ||
var Object = global.Object; | ||
var $Object = Object; | ||
@@ -9,3 +8,3 @@ // `ToObject` abstract operation | ||
module.exports = function (argument) { | ||
return Object(requireObjectCoercible(argument)); | ||
return $Object(requireObjectCoercible(argument)); | ||
}; |
@@ -1,10 +0,9 @@ | ||
var global = require('../internals/global'); | ||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var RangeError = global.RangeError; | ||
var $RangeError = RangeError; | ||
module.exports = function (it) { | ||
var result = toIntegerOrInfinity(it); | ||
if (result < 0) throw RangeError("The argument can't be less than 0"); | ||
if (result < 0) throw $RangeError("The argument can't be less than 0"); | ||
return result; | ||
}; |
@@ -1,2 +0,1 @@ | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -9,3 +8,3 @@ var isObject = require('../internals/is-object'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); | ||
@@ -23,3 +22,3 @@ | ||
if (!isObject(result) || isSymbol(result)) return result; | ||
throw TypeError("Can't convert object to primitive value"); | ||
throw $TypeError("Can't convert object to primitive value"); | ||
} | ||
@@ -26,0 +25,0 @@ if (pref === undefined) pref = 'number'; |
@@ -1,9 +0,8 @@ | ||
var global = require('../internals/global'); | ||
var classof = require('../internals/classof'); | ||
var String = global.String; | ||
var $String = String; | ||
module.exports = function (argument) { | ||
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); | ||
return String(argument); | ||
return $String(argument); | ||
}; |
@@ -1,8 +0,6 @@ | ||
var global = require('../internals/global'); | ||
var $String = String; | ||
var String = global.String; | ||
module.exports = function (argument) { | ||
try { | ||
return String(argument); | ||
return $String(argument); | ||
} catch (error) { | ||
@@ -9,0 +7,0 @@ return 'Object'; |
@@ -1,8 +0,6 @@ | ||
var global = require('../internals/global'); | ||
var $TypeError = TypeError; | ||
var TypeError = global.TypeError; | ||
module.exports = function (passed, required) { | ||
if (passed < required) throw TypeError('Not enough arguments'); | ||
if (passed < required) throw $TypeError('Not enough arguments'); | ||
return passed; | ||
}; |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var isPrototypeOf = require('../internals/object-is-prototype-of'); | ||
@@ -19,3 +18,3 @@ var getPrototypeOf = require('../internals/object-get-prototype-of'); | ||
var TO_STRING_TAG = wellKnownSymbol('toStringTag'); | ||
var Error = global.Error; | ||
var $Error = Error; | ||
var push = [].push; | ||
@@ -28,3 +27,3 @@ | ||
if (setPrototypeOf) { | ||
that = setPrototypeOf(new Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype); | ||
that = setPrototypeOf(new $Error(), isInstance ? getPrototypeOf(this) : AggregateErrorPrototype); | ||
} else { | ||
@@ -43,6 +42,6 @@ that = isInstance ? this : create(AggregateErrorPrototype); | ||
if (setPrototypeOf) setPrototypeOf($AggregateError, Error); | ||
else copyConstructorProperties($AggregateError, Error, { name: true }); | ||
if (setPrototypeOf) setPrototypeOf($AggregateError, $Error); | ||
else copyConstructorProperties($AggregateError, $Error, { name: true }); | ||
var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, { | ||
var AggregateErrorPrototype = $AggregateError.prototype = create($Error.prototype, { | ||
constructor: createPropertyDescriptor(1, $AggregateError), | ||
@@ -49,0 +48,0 @@ message: createPropertyDescriptor(1, ''), |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var fails = require('../internals/fails'); | ||
@@ -9,2 +8,3 @@ var isArray = require('../internals/is-array'); | ||
var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer'); | ||
var createProperty = require('../internals/create-property'); | ||
@@ -17,5 +17,2 @@ var arraySpeciesCreate = require('../internals/array-species-create'); | ||
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); | ||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; | ||
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; | ||
var TypeError = global.TypeError; | ||
@@ -55,6 +52,6 @@ // We can't use this feature detection in V8 since it causes | ||
len = lengthOfArrayLike(E); | ||
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); | ||
doesNotExceedSafeInteger(n + len); | ||
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); | ||
} else { | ||
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); | ||
doesNotExceedSafeInteger(n + 1); | ||
createProperty(A, n++, E); | ||
@@ -61,0 +58,0 @@ } |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var fails = require('../internals/fails'); | ||
@@ -8,7 +7,8 @@ var isConstructor = require('../internals/is-constructor'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
var ISNT_GENERIC = fails(function () { | ||
function F() { /* empty */ } | ||
return !(Array.of.call(F) instanceof F); | ||
// eslint-disable-next-line es-x/no-array-of -- safe | ||
return !($Array.of.call(F) instanceof F); | ||
}); | ||
@@ -23,3 +23,3 @@ | ||
var argumentsLength = arguments.length; | ||
var result = new (isConstructor(this) ? this : Array)(argumentsLength); | ||
var result = new (isConstructor(this) ? this : $Array)(argumentsLength); | ||
while (argumentsLength > index) createProperty(result, index, arguments[index++]); | ||
@@ -26,0 +26,0 @@ result.length = argumentsLength; |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var isArray = require('../internals/is-array'); | ||
@@ -18,3 +17,3 @@ var isConstructor = require('../internals/is-constructor'); | ||
var SPECIES = wellKnownSymbol('species'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
var max = Math.max; | ||
@@ -36,3 +35,3 @@ | ||
// cross-realm fallback | ||
if (isConstructor(Constructor) && (Constructor === Array || isArray(Constructor.prototype))) { | ||
if (isConstructor(Constructor) && (Constructor === $Array || isArray(Constructor.prototype))) { | ||
Constructor = undefined; | ||
@@ -43,7 +42,7 @@ } else if (isObject(Constructor)) { | ||
} | ||
if (Constructor === Array || Constructor === undefined) { | ||
if (Constructor === $Array || Constructor === undefined) { | ||
return un$Slice(O, k, fin); | ||
} | ||
} | ||
result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); | ||
result = new (Constructor === undefined ? $Array : Constructor)(max(fin - k, 0)); | ||
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); | ||
@@ -50,0 +49,0 @@ result.length = n; |
@@ -7,2 +7,3 @@ 'use strict'; | ||
var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var deletePropertyOrThrow = require('../internals/delete-property-or-throw'); | ||
var toString = require('../internals/to-string'); | ||
@@ -102,3 +103,3 @@ var fails = require('../internals/fails'); | ||
while (index < itemsLength) array[index] = items[index++]; | ||
while (index < arrayLength) delete array[index++]; | ||
while (index < arrayLength) deletePropertyOrThrow(array, index++); | ||
@@ -105,0 +106,0 @@ return array; |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var toObject = require('../internals/to-object'); | ||
var toAbsoluteIndex = require('../internals/to-absolute-index'); | ||
var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var lengthOfArrayLike = require('../internals/length-of-array-like'); | ||
var toObject = require('../internals/to-object'); | ||
var doesNotExceedSafeInteger = require('../internals/does-not-exceed-safe-integer'); | ||
var arraySpeciesCreate = require('../internals/array-species-create'); | ||
var createProperty = require('../internals/create-property'); | ||
var deletePropertyOrThrow = require('../internals/delete-property-or-throw'); | ||
var arrayMethodHasSpeciesSupport = require('../internals/array-method-has-species-support'); | ||
@@ -14,7 +15,4 @@ | ||
var TypeError = global.TypeError; | ||
var max = Math.max; | ||
var min = Math.min; | ||
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; | ||
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; | ||
@@ -40,5 +38,3 @@ // `Array.prototype.splice` method | ||
} | ||
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { | ||
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); | ||
} | ||
doesNotExceedSafeInteger(len + insertCount - actualDeleteCount); | ||
A = arraySpeciesCreate(O, actualDeleteCount); | ||
@@ -55,5 +51,5 @@ for (k = 0; k < actualDeleteCount; k++) { | ||
if (from in O) O[to] = O[from]; | ||
else delete O[to]; | ||
else deletePropertyOrThrow(O, to); | ||
} | ||
for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; | ||
for (k = len; k > len - actualDeleteCount + insertCount; k--) deletePropertyOrThrow(O, k - 1); | ||
} else if (insertCount > actualDeleteCount) { | ||
@@ -64,3 +60,3 @@ for (k = len - actualDeleteCount; k > actualStart; k--) { | ||
if (from in O) O[to] = O[from]; | ||
else delete O[to]; | ||
else deletePropertyOrThrow(O, to); | ||
} | ||
@@ -67,0 +63,0 @@ } |
// TODO: Remove from `core-js@4` | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
var Date = global.Date; | ||
var getTime = uncurryThis(Date.prototype.getTime); | ||
var $Date = Date; | ||
var getTime = uncurryThis($Date.prototype.getTime); | ||
@@ -13,4 +12,4 @@ // `Date.now` method | ||
now: function now() { | ||
return getTime(new Date()); | ||
return getTime(new $Date()); | ||
} | ||
}); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -11,5 +10,5 @@ var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var RangeError = global.RangeError; | ||
var String = global.String; | ||
var isFinite = global.isFinite; | ||
var $RangeError = RangeError; | ||
var $String = String; | ||
var $isFinite = isFinite; | ||
var abs = Math.abs; | ||
@@ -55,5 +54,5 @@ var floor = Math.floor; | ||
var f = toIntegerOrInfinity(fractionDigits); | ||
if (!isFinite(x)) return String(x); | ||
if (!$isFinite(x)) return String(x); | ||
// 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 $RangeError('Incorrect fraction digits'); | ||
if (ROUNDS_PROPERLY) return un$ToExponential(x, f); | ||
@@ -87,3 +86,3 @@ var s = ''; | ||
} | ||
m = String(n); | ||
m = $String(n); | ||
} | ||
@@ -98,3 +97,3 @@ if (f !== 0) { | ||
c = e > 0 ? '+' : '-'; | ||
d = String(abs(e)); | ||
d = $String(abs(e)); | ||
} | ||
@@ -101,0 +100,0 @@ m += 'e' + c + d; |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -10,4 +9,4 @@ var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var RangeError = global.RangeError; | ||
var String = global.String; | ||
var $RangeError = RangeError; | ||
var $String = String; | ||
var floor = Math.floor; | ||
@@ -60,3 +59,3 @@ var repeat = uncurryThis($repeat); | ||
if (s !== '' || index === 0 || data[index] !== 0) { | ||
var t = String(data[index]); | ||
var t = $String(data[index]); | ||
s = s === '' ? t : s + repeat('0', 7 - t.length) + t; | ||
@@ -89,6 +88,6 @@ } | ||
// 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 $RangeError('Incorrect fraction digits'); | ||
// eslint-disable-next-line no-self-compare -- NaN check | ||
if (number != number) return 'NaN'; | ||
if (number <= -1e21 || number >= 1e21) return String(number); | ||
if (number <= -1e21 || number >= 1e21) return $String(number); | ||
if (number < 0) { | ||
@@ -95,0 +94,0 @@ sign = '-'; |
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
var toAbsoluteIndex = require('../internals/to-absolute-index'); | ||
var RangeError = global.RangeError; | ||
var $RangeError = RangeError; | ||
var fromCharCode = String.fromCharCode; | ||
@@ -26,3 +25,3 @@ // eslint-disable-next-line es-x/no-string-fromcodepoint -- required for testing | ||
code = +arguments[i++]; | ||
if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point'); | ||
if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw $RangeError(code + ' is not a valid code point'); | ||
elements[i] = code < 0x10000 | ||
@@ -29,0 +28,0 @@ ? fromCharCode(code) |
'use strict'; | ||
/* eslint-disable es-x/no-string-prototype-matchall -- safe */ | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -31,3 +30,3 @@ var uncurryThis = require('../internals/function-uncurry-this'); | ||
var RegExpPrototype = RegExp.prototype; | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
var stringIndexOf = uncurryThis(''.indexOf); | ||
@@ -86,3 +85,3 @@ var un$MatchAll = uncurryThis(''.matchAll); | ||
flags = toString(requireObjectCoercible(getRegExpFlags(regexp))); | ||
if (!~stringIndexOf(flags, 'g')) throw TypeError('`.matchAll` does not allow non-global regexes'); | ||
if (!~stringIndexOf(flags, 'g')) throw $TypeError('`.matchAll` does not allow non-global regexes'); | ||
} | ||
@@ -89,0 +88,0 @@ if (WORKS_WITH_NON_GLOBAL_REGEX) return un$MatchAll(O, regexp); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -17,3 +16,3 @@ var uncurryThis = require('../internals/function-uncurry-this'); | ||
var REPLACE = wellKnownSymbol('replace'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
var indexOf = uncurryThis(''.indexOf); | ||
@@ -43,3 +42,3 @@ var replace = uncurryThis(''.replace); | ||
flags = toString(requireObjectCoercible(getRegExpFlags(searchValue))); | ||
if (!~indexOf(flags, 'g')) throw TypeError('`.replaceAll` does not allow non-global regexes'); | ||
if (!~indexOf(flags, 'g')) throw $TypeError('`.replaceAll` does not allow non-global regexes'); | ||
} | ||
@@ -46,0 +45,0 @@ replacer = getMethod(searchValue, REPLACE); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var arrayToReversed = require('../internals/array-to-reversed'); | ||
@@ -8,3 +7,3 @@ var toIndexedObject = require('../internals/to-indexed-object'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
@@ -15,3 +14,3 @@ // `Array.prototype.toReversed` method | ||
toReversed: function toReversed() { | ||
return arrayToReversed(toIndexedObject(this), Array); | ||
return arrayToReversed(toIndexedObject(this), $Array); | ||
} | ||
@@ -18,0 +17,0 @@ }); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -11,3 +10,3 @@ var aCallable = require('../internals/a-callable'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
var sort = uncurryThis(getVirtual('Array').sort); | ||
@@ -21,3 +20,3 @@ | ||
var O = toIndexedObject(this); | ||
var A = arrayFromConstructorAndList(Array, O); | ||
var A = arrayFromConstructorAndList($Array, O); | ||
return sort(A, compareFn); | ||
@@ -24,0 +23,0 @@ } |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var toIndexedObject = require('../internals/to-indexed-object'); | ||
@@ -9,3 +8,3 @@ var arraySlice = require('../internals/array-slice'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
@@ -17,3 +16,3 @@ // `Array.prototype.toSpliced` method | ||
toSpliced: function toSpliced(start, deleteCount /* , ...items */) { | ||
return arrayToSpliced(toIndexedObject(this), Array, arraySlice(arguments)); | ||
return arrayToSpliced(toIndexedObject(this), $Array, arraySlice(arguments)); | ||
} | ||
@@ -20,0 +19,0 @@ }); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var arrayWith = require('../internals/array-with'); | ||
var toIndexedObject = require('../internals/to-indexed-object'); | ||
var Array = global.Array; | ||
var $Array = Array; | ||
@@ -13,4 +12,4 @@ // `Array.prototype.with` method | ||
'with': function (index, value) { | ||
return arrayWith(toIndexedObject(this), Array, index, value); | ||
return arrayWith(toIndexedObject(this), $Array, index, value); | ||
} | ||
}); |
'use strict'; | ||
// https://github.com/tc39/proposal-iterator-helpers | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -11,3 +10,3 @@ var aCallable = require('../internals/a-callable'); | ||
var Promise = getBuiltIn('Promise'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -28,3 +27,3 @@ $({ target: 'AsyncIterator', proto: true, real: true, forced: true }, { | ||
if (anObject(step).done) { | ||
noInitial ? reject(TypeError('Reduce of empty iterator with no initial value')) : resolve(accumulator); | ||
noInitial ? reject($TypeError('Reduce of empty iterator with no initial value')) : resolve(accumulator); | ||
} else { | ||
@@ -31,0 +30,0 @@ var value = step.value; |
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var apply = require('../internals/function-apply'); | ||
@@ -8,3 +7,3 @@ var getCompositeKeyNode = require('../internals/composite-key'); | ||
var Object = global.Object; | ||
var $Object = Object; | ||
@@ -19,4 +18,4 @@ var initializer = function () { | ||
compositeKey: function compositeKey() { | ||
return apply(getCompositeKeyNode, Object, arguments).get('object', initializer); | ||
return apply(getCompositeKeyNode, $Object, arguments).get('object', initializer); | ||
} | ||
}); |
'use strict'; | ||
// https://github.com/tc39/proposal-iterator-helpers | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -12,3 +11,3 @@ var aCallable = require('../internals/a-callable'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -36,3 +35,3 @@ var IteratorProxy = createIteratorProxy(function () { | ||
if (!iteratorMethod) { | ||
throw TypeError('.flatMap callback should return an iterable object'); | ||
throw $TypeError('.flatMap callback should return an iterable object'); | ||
} | ||
@@ -39,0 +38,0 @@ |
'use strict'; | ||
// https://github.com/tc39/proposal-iterator-helpers | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var iterate = require('../internals/iterate'); | ||
@@ -9,3 +8,3 @@ var aCallable = require('../internals/a-callable'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -26,5 +25,5 @@ $({ target: 'Iterator', proto: true, real: true, forced: true }, { | ||
}, { IS_ITERATOR: true }); | ||
if (noInitial) throw TypeError('Reduce of empty iterator with no initial value'); | ||
if (noInitial) throw $TypeError('Reduce of empty iterator with no initial value'); | ||
return accumulator; | ||
} | ||
}); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var anObject = require('../internals/an-object'); | ||
@@ -9,3 +8,3 @@ var aCallable = require('../internals/a-callable'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -29,5 +28,5 @@ // `Map.prototype.reduce` method | ||
}, { AS_ENTRIES: true, IS_ITERATOR: true }); | ||
if (noInitial) throw TypeError('Reduce of empty map with no initial value'); | ||
if (noInitial) throw $TypeError('Reduce of empty map with no initial value'); | ||
return accumulator; | ||
} | ||
}); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var call = require('../internals/function-call'); | ||
@@ -8,3 +7,3 @@ var anObject = require('../internals/an-object'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -23,3 +22,3 @@ // `Set.prototype.update` method | ||
if (!isPresentInMap && length < 3) { | ||
throw TypeError('Updating absent value'); | ||
throw $TypeError('Updating absent value'); | ||
} | ||
@@ -26,0 +25,0 @@ var value = isPresentInMap ? call(get, map, key) : aCallable(length > 2 ? arguments[2] : undefined)(key, map); |
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var anObject = require('../internals/an-object'); | ||
@@ -13,3 +12,3 @@ var numberIsFinite = require('../internals/number-is-finite'); | ||
var getInternalState = InternalStateModule.getterFor(SEEDED_RANDOM_GENERATOR); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -33,5 +32,5 @@ var $SeededRandomGenerator = createIteratorConstructor(function SeededRandomGenerator(seed) { | ||
var seed = anObject(it).seed; | ||
if (!numberIsFinite(seed)) throw TypeError(SEED_TYPE_ERROR); | ||
if (!numberIsFinite(seed)) throw $TypeError(SEED_TYPE_ERROR); | ||
return new $SeededRandomGenerator(seed); | ||
} | ||
}); |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -10,5 +9,5 @@ var toIntegerOrInfinity = require('../internals/to-integer-or-infinity'); | ||
var INVALID_RADIX = 'Invalid radix'; | ||
var RangeError = global.RangeError; | ||
var SyntaxError = global.SyntaxError; | ||
var TypeError = global.TypeError; | ||
var $RangeError = RangeError; | ||
var $SyntaxError = SyntaxError; | ||
var $TypeError = TypeError; | ||
var valid = /^[\da-z]+$/; | ||
@@ -26,13 +25,13 @@ var charAt = uncurryThis(''.charAt); | ||
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 $TypeError(INVALID_NUMBER_REPRESENTATION); | ||
if (!string.length) throw $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 $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 $RangeError(INVALID_RADIX); | ||
if (!exec(valid, string) || numberToString(mathNum = parseInt(string, R), R) !== string) { | ||
throw SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
throw $SyntaxError(INVALID_NUMBER_REPRESENTATION); | ||
} | ||
@@ -39,0 +38,0 @@ return sign * mathNum; |
'use strict'; | ||
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var aCallable = require('../internals/a-callable'); | ||
@@ -9,3 +8,3 @@ var anObject = require('../internals/an-object'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
@@ -29,5 +28,5 @@ // `Set.prototype.reduce` method | ||
}, { IS_ITERATOR: true }); | ||
if (noInitial) throw TypeError('Reduce of empty set with no initial value'); | ||
if (noInitial) throw $TypeError('Reduce of empty set with no initial value'); | ||
return accumulator; | ||
} | ||
}); |
var $ = require('../internals/export'); | ||
var global = require('../internals/global'); | ||
var uncurryThis = require('../internals/function-uncurry-this'); | ||
@@ -8,3 +7,3 @@ var toIndexedObject = require('../internals/to-indexed-object'); | ||
var TypeError = global.TypeError; | ||
var $TypeError = TypeError; | ||
var ArrayPrototype = Array.prototype; | ||
@@ -25,3 +24,3 @@ var push = uncurryThis(ArrayPrototype.push); | ||
var nextVal = cookedTemplate[i++]; | ||
if (nextVal === undefined) throw TypeError('Incorrect template'); | ||
if (nextVal === undefined) throw $TypeError('Incorrect template'); | ||
push(elements, toString(nextVal)); | ||
@@ -28,0 +27,0 @@ if (i === literalSegments) return join(elements, ''); |
{ | ||
"name": "core-js-pure", | ||
"description": "Standard library", | ||
"version": "3.22.7", | ||
"version": "3.22.8", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
3006
4
866796
20253