update node modules

This commit is contained in:
s2
2020-07-20 16:20:39 +02:00
parent dcb748f037
commit f9fb05e4db
906 changed files with 124011 additions and 93468 deletions

40
node_modules/whatwg-url/lib/utils.js generated vendored
View File

@@ -9,34 +9,10 @@ function hasOwn(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
const getOwnPropertyDescriptors = typeof Object.getOwnPropertyDescriptors === "function" ?
Object.getOwnPropertyDescriptors :
// Polyfill exists until we require Node.js v8.x
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
obj => {
if (obj === undefined || obj === null) {
throw new TypeError("Cannot convert undefined or null to object");
}
obj = Object(obj);
const ownKeys = Reflect.ownKeys(obj);
const descriptors = {};
for (const key of ownKeys) {
const descriptor = Reflect.getOwnPropertyDescriptor(obj, key);
if (descriptor !== undefined) {
Reflect.defineProperty(descriptors, key, {
value: descriptor,
writable: true,
enumerable: true,
configurable: true
});
}
}
return descriptors;
};
const wrapperSymbol = Symbol("wrapper");
const implSymbol = Symbol("impl");
const sameObjectCaches = Symbol("SameObject caches");
const ctorRegistrySymbol = Symbol.for("[webidl2js] constructor registry");
function getSameObject(wrapper, prop, creator) {
if (!wrapper[sameObjectCaches]) {
@@ -87,6 +63,17 @@ function isArrayIndexPropName(P) {
return true;
}
const byteLengthGetter =
Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, "byteLength").get;
function isArrayBuffer(value) {
try {
byteLengthGetter.call(value);
return true;
} catch (e) {
return false;
}
}
const supportsPropertyIndex = Symbol("supports property index");
const supportedPropertyIndices = Symbol("supported property indices");
const supportsPropertyName = Symbol("supports property name");
@@ -102,16 +89,17 @@ const namedDelete = Symbol("named property delete");
module.exports = exports = {
isObject,
hasOwn,
getOwnPropertyDescriptors,
wrapperSymbol,
implSymbol,
getSameObject,
ctorRegistrySymbol,
wrapperForImpl,
implForWrapper,
tryWrapperForImpl,
tryImplForWrapper,
iterInternalSymbol,
IteratorPrototype,
isArrayBuffer,
isArrayIndexPropName,
supportsPropertyIndex,
supportedPropertyIndices,