1
0
mirror of https://github.com/S2-/minifyfromhtml.git synced 2025-08-03 20:30:04 +02:00

update node modules

This commit is contained in:
s2
2019-03-29 15:56:41 +01:00
parent f114871153
commit 89c32fb4e6
8347 changed files with 390123 additions and 159877 deletions

View File

@@ -39,336 +39,323 @@ const IteratorPrototype = Object.create(utils.IteratorPrototype, {
configurable: true
},
[Symbol.toStringTag]: {
value: "URLSearchParamsIterator",
writable: false,
enumerable: false,
value: "URLSearchParams Iterator",
configurable: true
}
});
function URLSearchParams() {
const args = [];
for (let i = 0; i < arguments.length && i < 1; ++i) {
args[i] = arguments[i];
}
if (args[0] !== undefined) {
if (utils.isObject(args[0])) {
if (args[0][Symbol.iterator] !== undefined) {
if (!utils.isObject(args[0])) {
throw new TypeError(
"Failed to construct 'URLSearchParams': parameter 1" + " sequence" + " is not an iterable object."
);
} else {
const V = [];
const tmp = args[0];
for (let nextItem of tmp) {
if (!utils.isObject(nextItem)) {
class URLSearchParams {
constructor() {
const args = [];
{
let curArg = arguments[0];
if (curArg !== undefined) {
if (utils.isObject(curArg)) {
if (curArg[Symbol.iterator] !== undefined) {
if (!utils.isObject(curArg)) {
throw new TypeError(
"Failed to construct 'URLSearchParams': parameter 1" +
" sequence" +
"'s element" +
" is not an iterable object."
"Failed to construct 'URLSearchParams': parameter 1" + " sequence" + " is not an iterable object."
);
} else {
const V = [];
const tmp = nextItem;
const tmp = curArg;
for (let nextItem of tmp) {
nextItem = conversions["USVString"](nextItem, {
context:
"Failed to construct 'URLSearchParams': parameter 1" + " sequence" + "'s element" + "'s element"
});
if (!utils.isObject(nextItem)) {
throw new TypeError(
"Failed to construct 'URLSearchParams': parameter 1" +
" sequence" +
"'s element" +
" is not an iterable object."
);
} else {
const V = [];
const tmp = nextItem;
for (let nextItem of tmp) {
nextItem = conversions["USVString"](nextItem, {
context:
"Failed to construct 'URLSearchParams': parameter 1" + " sequence" + "'s element" + "'s element"
});
V.push(nextItem);
}
nextItem = V;
}
V.push(nextItem);
}
nextItem = V;
curArg = V;
}
} else {
if (!utils.isObject(curArg)) {
throw new TypeError(
"Failed to construct 'URLSearchParams': parameter 1" + " record" + " is not an object."
);
} else {
const result = Object.create(null);
for (const key of Reflect.ownKeys(curArg)) {
const desc = Object.getOwnPropertyDescriptor(curArg, key);
if (desc && desc.enumerable) {
let typedKey = key;
let typedValue = curArg[key];
V.push(nextItem);
typedKey = conversions["USVString"](typedKey, {
context: "Failed to construct 'URLSearchParams': parameter 1" + " record" + "'s key"
});
typedValue = conversions["USVString"](typedValue, {
context: "Failed to construct 'URLSearchParams': parameter 1" + " record" + "'s value"
});
result[typedKey] = typedValue;
}
}
curArg = result;
}
}
args[0] = V;
} else {
curArg = conversions["USVString"](curArg, { context: "Failed to construct 'URLSearchParams': parameter 1" });
}
} else {
if (!utils.isObject(args[0])) {
throw new TypeError("Failed to construct 'URLSearchParams': parameter 1" + " record" + " is not an object.");
} else {
const result = Object.create(null);
for (const key of Reflect.ownKeys(args[0])) {
const desc = Object.getOwnPropertyDescriptor(args[0], key);
if (desc && desc.enumerable) {
let typedKey = key;
let typedValue = args[0][key];
typedKey = conversions["USVString"](typedKey, {
context: "Failed to construct 'URLSearchParams': parameter 1" + " record" + "'s key"
});
typedValue = conversions["USVString"](typedValue, {
context: "Failed to construct 'URLSearchParams': parameter 1" + " record" + "'s value"
});
result[typedKey] = typedValue;
}
}
args[0] = result;
}
curArg = "";
}
} else {
args[0] = conversions["USVString"](args[0], { context: "Failed to construct 'URLSearchParams': parameter 1" });
args.push(curArg);
}
} else {
args[0] = "";
return iface.setup(Object.create(new.target.prototype), args);
}
iface.setup(this, args);
}
append(name, value) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
Object.defineProperty(URLSearchParams, "prototype", {
value: URLSearchParams.prototype,
writable: false,
enumerable: false,
configurable: false
});
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only " +
arguments.length +
" present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'append' on 'URLSearchParams': parameter 1"
});
args.push(curArg);
}
{
let curArg = arguments[1];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'append' on 'URLSearchParams': parameter 2"
});
args.push(curArg);
}
return this[impl].append(...args);
}
Object.defineProperty(URLSearchParams.prototype, Symbol.iterator, {
writable: true,
enumerable: false,
configurable: true,
value: function entries() {
delete(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'delete' on 'URLSearchParams': parameter 1"
});
args.push(curArg);
}
return this[impl].delete(...args);
}
get(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'get' on 'URLSearchParams': parameter 1"
});
args.push(curArg);
}
return this[impl].get(...args);
}
getAll(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'getAll' on 'URLSearchParams': parameter 1"
});
args.push(curArg);
}
return utils.tryWrapperForImpl(this[impl].getAll(...args));
}
has(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'has' on 'URLSearchParams': parameter 1"
});
args.push(curArg);
}
return this[impl].has(...args);
}
set(name, value) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only " + arguments.length + " present."
);
}
const args = [];
{
let curArg = arguments[0];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'set' on 'URLSearchParams': parameter 1"
});
args.push(curArg);
}
{
let curArg = arguments[1];
curArg = conversions["USVString"](curArg, {
context: "Failed to execute 'set' on 'URLSearchParams': parameter 2"
});
args.push(curArg);
}
return this[impl].set(...args);
}
sort() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return this[impl].sort();
}
toString() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return this[impl].toString();
}
keys() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return module.exports.createDefaultIterator(this, "key");
}
values() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return module.exports.createDefaultIterator(this, "value");
}
entries() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return module.exports.createDefaultIterator(this, "key+value");
}
forEach(callback) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError("Failed to execute 'forEach' on 'iterable': 1 argument required, " + "but only 0 present.");
}
if (typeof callback !== "function") {
throw new TypeError(
"Failed to execute 'forEach' on 'iterable': The callback provided " + "as parameter 1 is not a function."
);
}
const thisArg = arguments[1];
let pairs = Array.from(this[impl]);
let i = 0;
while (i < pairs.length) {
const [key, value] = pairs[i].map(utils.tryWrapperForImpl);
callback.call(thisArg, value, key, this);
pairs = Array.from(this[impl]);
i++;
}
}
}
Object.defineProperties(URLSearchParams.prototype, {
append: { enumerable: true },
delete: { enumerable: true },
get: { enumerable: true },
getAll: { enumerable: true },
has: { enumerable: true },
set: { enumerable: true },
sort: { enumerable: true },
toString: { enumerable: true },
keys: { enumerable: true },
values: { enumerable: true },
entries: { enumerable: true },
forEach: { enumerable: true },
[Symbol.toStringTag]: { value: "URLSearchParams", configurable: true },
[Symbol.iterator]: { value: URLSearchParams.prototype.entries, configurable: true, writable: true }
});
URLSearchParams.prototype.forEach = function forEach(callback) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'forEach' on 'URLSearchParams': 1 argument required, " + "but only 0 present."
);
}
if (typeof callback !== "function") {
throw new TypeError(
"Failed to execute 'forEach' on 'URLSearchParams': The callback provided " + "as parameter 1 is not a function."
);
}
const thisArg = arguments[1];
let pairs = Array.from(this[impl]);
let i = 0;
while (i < pairs.length) {
const [key, value] = pairs[i].map(utils.tryWrapperForImpl);
callback.call(thisArg, value, key, this);
pairs = Array.from(this[impl]);
i++;
}
};
URLSearchParams.prototype.append = function append(name, value) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'append' on 'URLSearchParams': 2 " +
"arguments required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 2; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0], {
context: "Failed to execute 'append' on 'URLSearchParams': parameter 1"
});
args[1] = conversions["USVString"](args[1], {
context: "Failed to execute 'append' on 'URLSearchParams': parameter 2"
});
return this[impl].append(...args);
};
URLSearchParams.prototype.delete = function _(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'delete' on 'URLSearchParams': 1 " +
"argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 1; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0], {
context: "Failed to execute 'delete' on 'URLSearchParams': parameter 1"
});
return this[impl].delete(...args);
};
URLSearchParams.prototype.get = function get(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'get' on 'URLSearchParams': 1 " +
"argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 1; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0], { context: "Failed to execute 'get' on 'URLSearchParams': parameter 1" });
return this[impl].get(...args);
};
URLSearchParams.prototype.getAll = function getAll(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'getAll' on 'URLSearchParams': 1 " +
"argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 1; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0], {
context: "Failed to execute 'getAll' on 'URLSearchParams': parameter 1"
});
return utils.tryWrapperForImpl(this[impl].getAll(...args));
};
URLSearchParams.prototype.has = function has(name) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 1) {
throw new TypeError(
"Failed to execute 'has' on 'URLSearchParams': 1 " +
"argument required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 1; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0], { context: "Failed to execute 'has' on 'URLSearchParams': parameter 1" });
return this[impl].has(...args);
};
URLSearchParams.prototype.set = function set(name, value) {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
if (arguments.length < 2) {
throw new TypeError(
"Failed to execute 'set' on 'URLSearchParams': 2 " +
"arguments required, but only " +
arguments.length +
" present."
);
}
const args = [];
for (let i = 0; i < arguments.length && i < 2; ++i) {
args[i] = arguments[i];
}
args[0] = conversions["USVString"](args[0], { context: "Failed to execute 'set' on 'URLSearchParams': parameter 1" });
args[1] = conversions["USVString"](args[1], { context: "Failed to execute 'set' on 'URLSearchParams': parameter 2" });
return this[impl].set(...args);
};
URLSearchParams.prototype.sort = function sort() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return this[impl].sort();
};
URLSearchParams.prototype.toString = function toString() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return this[impl].toString();
};
URLSearchParams.prototype.entries = URLSearchParams.prototype[Symbol.iterator];
URLSearchParams.prototype.keys = function keys() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return module.exports.createDefaultIterator(this, "key");
};
URLSearchParams.prototype.values = function values() {
if (!this || !module.exports.is(this)) {
throw new TypeError("Illegal invocation");
}
return module.exports.createDefaultIterator(this, "value");
};
Object.defineProperty(URLSearchParams.prototype, Symbol.toStringTag, {
value: "URLSearchParams",
writable: false,
enumerable: false,
configurable: true
});
const iface = {
mixedInto: [],
// When an interface-module that implements this interface as a mixin is loaded, it will append its own `.is()`
// method into this array. It allows objects that directly implements *those* interfaces to be recognized as
// implementing this mixin interface.
_mixedIntoPredicates: [],
is(obj) {
if (obj) {
if (obj[impl] instanceof Impl.implementation) {
if (utils.hasOwn(obj, impl) && obj[impl] instanceof Impl.implementation) {
return true;
}
for (let i = 0; i < module.exports.mixedInto.length; ++i) {
if (obj instanceof module.exports.mixedInto[i]) {
for (const isMixedInto of module.exports._mixedIntoPredicates) {
if (isMixedInto(obj)) {
return true;
}
}
@@ -382,8 +369,8 @@ const iface = {
}
const wrapper = utils.wrapperForImpl(obj);
for (let i = 0; i < module.exports.mixedInto.length; ++i) {
if (wrapper instanceof module.exports.mixedInto[i]) {
for (const isMixedInto of module.exports._mixedIntoPredicates) {
if (isMixedInto(wrapper)) {
return true;
}
}
@@ -401,8 +388,6 @@ const iface = {
const iterator = Object.create(IteratorPrototype);
Object.defineProperty(iterator, utils.iterInternalSymbol, {
value: { target, kind, index: 0 },
writable: false,
enumerable: false,
configurable: true
});
return iterator;
@@ -427,8 +412,6 @@ const iface = {
this._internalSetup(obj);
Object.defineProperty(obj, impl, {
value: new Impl.implementation(constructorArgs, privateData),
writable: false,
enumerable: false,
configurable: true
});
@@ -446,4 +429,4 @@ const iface = {
}; // iface
module.exports = iface;
const Impl = require(".//URLSearchParams-impl.js");
const Impl = require("./URLSearchParams-impl.js");