Update checked-in dependencies
This commit is contained in:
parent
1afca056e3
commit
6989ba7bd2
3942 changed files with 55190 additions and 132206 deletions
329
node_modules/object.assign/dist/browser.js
generated
vendored
329
node_modules/object.assign/dist/browser.js
generated
vendored
|
|
@ -10,7 +10,7 @@ module.exports = assign.shim();
|
|||
|
||||
delete assign.shim;
|
||||
|
||||
},{"./":3,"object-keys":15}],2:[function(require,module,exports){
|
||||
},{"./":3,"object-keys":18}],2:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
// modified from https://github.com/es-shims/es6-shim
|
||||
|
|
@ -58,7 +58,7 @@ module.exports = function assign(target, source1) {
|
|||
return to; // step 4
|
||||
};
|
||||
|
||||
},{"call-bind/callBound":4,"has-symbols/shams":12,"object-keys":15}],3:[function(require,module,exports){
|
||||
},{"call-bind/callBound":4,"has-symbols/shams":15,"object-keys":18}],3:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var defineProperties = require('define-properties');
|
||||
|
|
@ -82,7 +82,7 @@ defineProperties(bound, {
|
|||
|
||||
module.exports = bound;
|
||||
|
||||
},{"./implementation":2,"./polyfill":17,"./shim":18,"call-bind":5,"define-properties":6}],4:[function(require,module,exports){
|
||||
},{"./implementation":2,"./polyfill":21,"./shim":22,"call-bind":5,"define-properties":7}],4:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
|
@ -99,17 +99,18 @@ module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|||
return intrinsic;
|
||||
};
|
||||
|
||||
},{"./":5,"get-intrinsic":9}],5:[function(require,module,exports){
|
||||
},{"./":5,"get-intrinsic":10}],5:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var bind = require('function-bind');
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var setFunctionLength = require('set-function-length');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
||||
var $call = GetIntrinsic('%Function.prototype.call%');
|
||||
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
||||
|
||||
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
||||
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
||||
var $max = GetIntrinsic('%Math.max%');
|
||||
|
||||
|
|
@ -123,19 +124,15 @@ if ($defineProperty) {
|
|||
}
|
||||
|
||||
module.exports = function callBind(originalFunction) {
|
||||
var func = $reflectApply(bind, $call, arguments);
|
||||
if ($gOPD && $defineProperty) {
|
||||
var desc = $gOPD(func, 'length');
|
||||
if (desc.configurable) {
|
||||
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
||||
$defineProperty(
|
||||
func,
|
||||
'length',
|
||||
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
||||
);
|
||||
}
|
||||
if (typeof originalFunction !== 'function') {
|
||||
throw new $TypeError('a function is required');
|
||||
}
|
||||
return func;
|
||||
var func = $reflectApply(bind, $call, arguments);
|
||||
return setFunctionLength(
|
||||
func,
|
||||
1 + $max(0, originalFunction.length - (arguments.length - 1)),
|
||||
true
|
||||
);
|
||||
};
|
||||
|
||||
var applyBind = function applyBind() {
|
||||
|
|
@ -148,7 +145,77 @@ if ($defineProperty) {
|
|||
module.exports.apply = applyBind;
|
||||
}
|
||||
|
||||
},{"function-bind":8,"get-intrinsic":9}],6:[function(require,module,exports){
|
||||
},{"function-bind":9,"get-intrinsic":10,"set-function-length":20}],6:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var hasPropertyDescriptors = require('has-property-descriptors')();
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $defineProperty = hasPropertyDescriptors && GetIntrinsic('%Object.defineProperty%', true);
|
||||
if ($defineProperty) {
|
||||
try {
|
||||
$defineProperty({}, 'a', { value: 1 });
|
||||
} catch (e) {
|
||||
// IE 8 has a broken defineProperty
|
||||
$defineProperty = false;
|
||||
}
|
||||
}
|
||||
|
||||
var $SyntaxError = GetIntrinsic('%SyntaxError%');
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
|
||||
var gopd = require('gopd');
|
||||
|
||||
/** @type {(obj: Record<PropertyKey, unknown>, property: PropertyKey, value: unknown, nonEnumerable?: boolean | null, nonWritable?: boolean | null, nonConfigurable?: boolean | null, loose?: boolean) => void} */
|
||||
module.exports = function defineDataProperty(
|
||||
obj,
|
||||
property,
|
||||
value
|
||||
) {
|
||||
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
||||
throw new $TypeError('`obj` must be an object or a function`');
|
||||
}
|
||||
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
||||
throw new $TypeError('`property` must be a string or a symbol`');
|
||||
}
|
||||
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
||||
throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
||||
throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
||||
throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
|
||||
}
|
||||
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
||||
throw new $TypeError('`loose`, if provided, must be a boolean');
|
||||
}
|
||||
|
||||
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
||||
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
||||
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
||||
var loose = arguments.length > 6 ? arguments[6] : false;
|
||||
|
||||
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
||||
var desc = !!gopd && gopd(obj, property);
|
||||
|
||||
if ($defineProperty) {
|
||||
$defineProperty(obj, property, {
|
||||
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
||||
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
||||
value: value,
|
||||
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
||||
});
|
||||
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
||||
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
||||
obj[property] = value; // eslint-disable-line no-param-reassign
|
||||
} else {
|
||||
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
||||
}
|
||||
};
|
||||
|
||||
},{"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],7:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var keys = require('object-keys');
|
||||
|
|
@ -156,29 +223,29 @@ var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbo
|
|||
|
||||
var toStr = Object.prototype.toString;
|
||||
var concat = Array.prototype.concat;
|
||||
var origDefineProperty = Object.defineProperty;
|
||||
var defineDataProperty = require('define-data-property');
|
||||
|
||||
var isFunction = function (fn) {
|
||||
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
||||
};
|
||||
|
||||
var hasPropertyDescriptors = require('has-property-descriptors')();
|
||||
|
||||
var supportsDescriptors = origDefineProperty && hasPropertyDescriptors;
|
||||
var supportsDescriptors = require('has-property-descriptors')();
|
||||
|
||||
var defineProperty = function (object, name, value, predicate) {
|
||||
if (name in object && (!isFunction(predicate) || !predicate())) {
|
||||
return;
|
||||
if (name in object) {
|
||||
if (predicate === true) {
|
||||
if (object[name] === value) {
|
||||
return;
|
||||
}
|
||||
} else if (!isFunction(predicate) || !predicate()) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (supportsDescriptors) {
|
||||
origDefineProperty(object, name, {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
value: value,
|
||||
writable: true
|
||||
});
|
||||
defineDataProperty(object, name, value, true);
|
||||
} else {
|
||||
object[name] = value; // eslint-disable-line no-param-reassign
|
||||
defineDataProperty(object, name, value);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -197,49 +264,81 @@ defineProperties.supportsDescriptors = !!supportsDescriptors;
|
|||
|
||||
module.exports = defineProperties;
|
||||
|
||||
},{"has-property-descriptors":10,"object-keys":15}],7:[function(require,module,exports){
|
||||
},{"define-data-property":6,"has-property-descriptors":12,"object-keys":18}],8:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/* eslint no-invalid-this: 1 */
|
||||
|
||||
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
||||
var slice = Array.prototype.slice;
|
||||
var toStr = Object.prototype.toString;
|
||||
var max = Math.max;
|
||||
var funcType = '[object Function]';
|
||||
|
||||
var concatty = function concatty(a, b) {
|
||||
var arr = [];
|
||||
|
||||
for (var i = 0; i < a.length; i += 1) {
|
||||
arr[i] = a[i];
|
||||
}
|
||||
for (var j = 0; j < b.length; j += 1) {
|
||||
arr[j + a.length] = b[j];
|
||||
}
|
||||
|
||||
return arr;
|
||||
};
|
||||
|
||||
var slicy = function slicy(arrLike, offset) {
|
||||
var arr = [];
|
||||
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
|
||||
arr[j] = arrLike[i];
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
var joiny = function (arr, joiner) {
|
||||
var str = '';
|
||||
for (var i = 0; i < arr.length; i += 1) {
|
||||
str += arr[i];
|
||||
if (i + 1 < arr.length) {
|
||||
str += joiner;
|
||||
}
|
||||
}
|
||||
return str;
|
||||
};
|
||||
|
||||
module.exports = function bind(that) {
|
||||
var target = this;
|
||||
if (typeof target !== 'function' || toStr.call(target) !== funcType) {
|
||||
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
||||
throw new TypeError(ERROR_MESSAGE + target);
|
||||
}
|
||||
var args = slice.call(arguments, 1);
|
||||
var args = slicy(arguments, 1);
|
||||
|
||||
var bound;
|
||||
var binder = function () {
|
||||
if (this instanceof bound) {
|
||||
var result = target.apply(
|
||||
this,
|
||||
args.concat(slice.call(arguments))
|
||||
concatty(args, arguments)
|
||||
);
|
||||
if (Object(result) === result) {
|
||||
return result;
|
||||
}
|
||||
return this;
|
||||
} else {
|
||||
return target.apply(
|
||||
that,
|
||||
args.concat(slice.call(arguments))
|
||||
);
|
||||
}
|
||||
return target.apply(
|
||||
that,
|
||||
concatty(args, arguments)
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
var boundLength = Math.max(0, target.length - args.length);
|
||||
var boundLength = max(0, target.length - args.length);
|
||||
var boundArgs = [];
|
||||
for (var i = 0; i < boundLength; i++) {
|
||||
boundArgs.push('$' + i);
|
||||
boundArgs[i] = '$' + i;
|
||||
}
|
||||
|
||||
bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
|
||||
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
||||
|
||||
if (target.prototype) {
|
||||
var Empty = function Empty() {};
|
||||
|
|
@ -251,14 +350,14 @@ module.exports = function bind(that) {
|
|||
return bound;
|
||||
};
|
||||
|
||||
},{}],8:[function(require,module,exports){
|
||||
},{}],9:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
||||
module.exports = Function.prototype.bind || implementation;
|
||||
|
||||
},{"./implementation":7}],9:[function(require,module,exports){
|
||||
},{"./implementation":8}],10:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var undefined;
|
||||
|
|
@ -304,18 +403,23 @@ var ThrowTypeError = $gOPD
|
|||
: throwTypeError;
|
||||
|
||||
var hasSymbols = require('has-symbols')();
|
||||
var hasProto = require('has-proto')();
|
||||
|
||||
var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
|
||||
var getProto = Object.getPrototypeOf || (
|
||||
hasProto
|
||||
? function (x) { return x.__proto__; } // eslint-disable-line no-proto
|
||||
: null
|
||||
);
|
||||
|
||||
var needsEval = {};
|
||||
|
||||
var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
|
||||
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
|
||||
|
||||
var INTRINSICS = {
|
||||
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
|
||||
'%Array%': Array,
|
||||
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
|
||||
'%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
|
||||
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
|
||||
'%AsyncFromSyncIteratorPrototype%': undefined,
|
||||
'%AsyncFunction%': needsEval,
|
||||
'%AsyncGenerator%': needsEval,
|
||||
|
|
@ -323,6 +427,8 @@ var INTRINSICS = {
|
|||
'%AsyncIteratorPrototype%': needsEval,
|
||||
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
|
||||
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
|
||||
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
|
||||
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
|
||||
'%Boolean%': Boolean,
|
||||
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
|
||||
'%Date%': Date,
|
||||
|
|
@ -343,10 +449,10 @@ var INTRINSICS = {
|
|||
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
|
||||
'%isFinite%': isFinite,
|
||||
'%isNaN%': isNaN,
|
||||
'%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
||||
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
|
||||
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
|
||||
'%Map%': typeof Map === 'undefined' ? undefined : Map,
|
||||
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
|
||||
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
|
||||
'%Math%': Math,
|
||||
'%Number%': Number,
|
||||
'%Object%': Object,
|
||||
|
|
@ -359,10 +465,10 @@ var INTRINSICS = {
|
|||
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
|
||||
'%RegExp%': RegExp,
|
||||
'%Set%': typeof Set === 'undefined' ? undefined : Set,
|
||||
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
|
||||
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
|
||||
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
|
||||
'%String%': String,
|
||||
'%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
|
||||
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
|
||||
'%Symbol%': hasSymbols ? Symbol : undefined,
|
||||
'%SyntaxError%': $SyntaxError,
|
||||
'%ThrowTypeError%': ThrowTypeError,
|
||||
|
|
@ -378,6 +484,16 @@ var INTRINSICS = {
|
|||
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
|
||||
};
|
||||
|
||||
if (getProto) {
|
||||
try {
|
||||
null.error; // eslint-disable-line no-unused-expressions
|
||||
} catch (e) {
|
||||
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
||||
var errorProto = getProto(getProto(e));
|
||||
INTRINSICS['%Error.prototype%'] = errorProto;
|
||||
}
|
||||
}
|
||||
|
||||
var doEval = function doEval(name) {
|
||||
var value;
|
||||
if (name === '%AsyncFunction%') {
|
||||
|
|
@ -393,7 +509,7 @@ var doEval = function doEval(name) {
|
|||
}
|
||||
} else if (name === '%AsyncIteratorPrototype%') {
|
||||
var gen = doEval('%AsyncGenerator%');
|
||||
if (gen) {
|
||||
if (gen && getProto) {
|
||||
value = getProto(gen.prototype);
|
||||
}
|
||||
}
|
||||
|
|
@ -458,11 +574,12 @@ var LEGACY_ALIASES = {
|
|||
};
|
||||
|
||||
var bind = require('function-bind');
|
||||
var hasOwn = require('has');
|
||||
var hasOwn = require('hasown');
|
||||
var $concat = bind.call(Function.call, Array.prototype.concat);
|
||||
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
||||
var $replace = bind.call(Function.call, String.prototype.replace);
|
||||
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
||||
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
||||
|
||||
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
||||
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
||||
|
|
@ -518,6 +635,9 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|||
throw new $TypeError('"allowMissing" argument must be a boolean');
|
||||
}
|
||||
|
||||
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
||||
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
||||
}
|
||||
var parts = stringToPath(name);
|
||||
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
||||
|
||||
|
|
@ -590,7 +710,25 @@ module.exports = function GetIntrinsic(name, allowMissing) {
|
|||
return value;
|
||||
};
|
||||
|
||||
},{"function-bind":8,"has":13,"has-symbols":11}],10:[function(require,module,exports){
|
||||
},{"function-bind":9,"has-proto":13,"has-symbols":14,"hasown":16}],11:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
||||
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
||||
|
||||
if ($gOPD) {
|
||||
try {
|
||||
$gOPD([], 'length');
|
||||
} catch (e) {
|
||||
// IE 8 has a broken gOPD
|
||||
$gOPD = null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = $gOPD;
|
||||
|
||||
},{"get-intrinsic":10}],12:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
|
|
@ -625,7 +763,20 @@ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBu
|
|||
|
||||
module.exports = hasPropertyDescriptors;
|
||||
|
||||
},{"get-intrinsic":9}],11:[function(require,module,exports){
|
||||
},{"get-intrinsic":10}],13:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var test = {
|
||||
foo: {}
|
||||
};
|
||||
|
||||
var $Object = Object;
|
||||
|
||||
module.exports = function hasProto() {
|
||||
return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
|
||||
};
|
||||
|
||||
},{}],14:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
||||
|
|
@ -640,7 +791,7 @@ module.exports = function hasNativeSymbols() {
|
|||
return hasSymbolSham();
|
||||
};
|
||||
|
||||
},{"./shams":12}],12:[function(require,module,exports){
|
||||
},{"./shams":15}],15:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
||||
|
|
@ -684,14 +835,17 @@ module.exports = function hasSymbols() {
|
|||
return true;
|
||||
};
|
||||
|
||||
},{}],13:[function(require,module,exports){
|
||||
},{}],16:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var call = Function.prototype.call;
|
||||
var $hasOwn = Object.prototype.hasOwnProperty;
|
||||
var bind = require('function-bind');
|
||||
|
||||
module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
|
||||
/** @type {(o: {}, p: PropertyKey) => p is keyof o} */
|
||||
module.exports = bind.call(call, $hasOwn);
|
||||
|
||||
},{"function-bind":8}],14:[function(require,module,exports){
|
||||
},{"function-bind":9}],17:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var keysShim;
|
||||
|
|
@ -815,7 +969,7 @@ if (!Object.keys) {
|
|||
}
|
||||
module.exports = keysShim;
|
||||
|
||||
},{"./isArguments":16}],15:[function(require,module,exports){
|
||||
},{"./isArguments":19}],18:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var slice = Array.prototype.slice;
|
||||
|
|
@ -849,7 +1003,7 @@ keysShim.shim = function shimObjectKeys() {
|
|||
|
||||
module.exports = keysShim;
|
||||
|
||||
},{"./implementation":14,"./isArguments":16}],16:[function(require,module,exports){
|
||||
},{"./implementation":17,"./isArguments":19}],19:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var toStr = Object.prototype.toString;
|
||||
|
|
@ -868,7 +1022,50 @@ module.exports = function isArguments(value) {
|
|||
return isArgs;
|
||||
};
|
||||
|
||||
},{}],17:[function(require,module,exports){
|
||||
},{}],20:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var GetIntrinsic = require('get-intrinsic');
|
||||
var define = require('define-data-property');
|
||||
var hasDescriptors = require('has-property-descriptors')();
|
||||
var gOPD = require('gopd');
|
||||
|
||||
var $TypeError = GetIntrinsic('%TypeError%');
|
||||
var $floor = GetIntrinsic('%Math.floor%');
|
||||
|
||||
module.exports = function setFunctionLength(fn, length) {
|
||||
if (typeof fn !== 'function') {
|
||||
throw new $TypeError('`fn` is not a function');
|
||||
}
|
||||
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
|
||||
throw new $TypeError('`length` must be a positive 32-bit integer');
|
||||
}
|
||||
|
||||
var loose = arguments.length > 2 && !!arguments[2];
|
||||
|
||||
var functionLengthIsConfigurable = true;
|
||||
var functionLengthIsWritable = true;
|
||||
if ('length' in fn && gOPD) {
|
||||
var desc = gOPD(fn, 'length');
|
||||
if (desc && !desc.configurable) {
|
||||
functionLengthIsConfigurable = false;
|
||||
}
|
||||
if (desc && !desc.writable) {
|
||||
functionLengthIsWritable = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
||||
if (hasDescriptors) {
|
||||
define(fn, 'length', length, true, true);
|
||||
} else {
|
||||
define(fn, 'length', length);
|
||||
}
|
||||
}
|
||||
return fn;
|
||||
};
|
||||
|
||||
},{"define-data-property":6,"get-intrinsic":10,"gopd":11,"has-property-descriptors":12}],21:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var implementation = require('./implementation');
|
||||
|
|
@ -925,7 +1122,7 @@ module.exports = function getPolyfill() {
|
|||
return Object.assign;
|
||||
};
|
||||
|
||||
},{"./implementation":2}],18:[function(require,module,exports){
|
||||
},{"./implementation":2}],22:[function(require,module,exports){
|
||||
'use strict';
|
||||
|
||||
var define = require('define-properties');
|
||||
|
|
@ -941,4 +1138,4 @@ module.exports = function shimAssign() {
|
|||
return polyfill;
|
||||
};
|
||||
|
||||
},{"./polyfill":17,"define-properties":6}]},{},[1]);
|
||||
},{"./polyfill":21,"define-properties":7}]},{},[1]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue