Files
discord-decomp/_bundle/isInstanceOf.js
T
2026-11-01 12:12:55 +02:00

77 lines
2.7 KiB
JavaScript

// Metro module 827 (f828).
let toString;
const isInstanceOf = function isInstanceOf(originalException, a1) {
let r2;
try {
r2 = originalException instanceof a1;
} catch ($e) {
return false;
}
return r2;
};
Object.defineProperty(exports, Symbol.toStringTag, {
value: "Module"
});
toString = Object.prototype.toString;
export function isDOMError(a0) {
const call = toString.call;
return toString.call(a0) === `[object DOMError]`;
}
export function isDOMException(a0) {
const call = toString.call;
return toString.call(a0) === `[object DOMException]`;
}
export function isElement(a0) {
const Element2 = globalThis.Element;
return typeof Element2 !== "undefined" ? isInstanceOf(a0, Element) : typeof Element2 !== "undefined";
}
export function isError(a0) {
const call = toString.call;
const r5 = toString.call(a0);
if (r5 !== "[object Error]" && r5 !== "[object Exception]" && r5 !== "[object DOMException]" && r5 !== "[object WebAssembly.Exception]") {
return isInstanceOf(a0, Error);
}
return true;
}
export function isErrorEvent(a0) {
const call = toString.call;
return toString.call(a0) === `[object ErrorEvent]`;
}
export function isEvent(a0) {
const Event2 = globalThis.Event;
return typeof Event2 !== "undefined" ? isInstanceOf(a0, Event) : typeof Event2 !== "undefined";
}
export { isInstanceOf };
export function isParameterizedString(a0) {
return (typeof a0 === "object" ? a0 !== null : typeof a0 === "object") && "__sentry_template_string__" in a0 && "__sentry_template_values__" in a0;
}
export function isPlainObject(a0) {
const call = toString.call;
return toString.call(a0) === `[object Object]`;
}
export function isPrimitive(a0) {
return a0 === null || (typeof a0 === "object" ? a0 !== null : typeof a0 === "object") && "__sentry_template_string__" in a0 && "__sentry_template_values__" in a0 || (typeof a0 !== "object" ? typeof a0 !== "function" : typeof a0 !== "object");
}
export function isRegExp(a0) {
const call = toString.call;
return toString.call(a0) === `[object RegExp]`;
}
export function isRequest(a0) {
const Request2 = globalThis.Request;
return typeof Request2 !== "undefined" ? isInstanceOf(a0, Request) : typeof Request2 !== "undefined";
}
export function isString(a0) {
const call = toString.call;
return toString.call(a0) === `[object String]`;
}
export function isSyntheticEvent(a0) {
const call = toString.call;
return toString.call(a0) === `[object Object]` && "nativeEvent" in a0 && "preventDefault" in a0 && "stopPropagation" in a0;
}
export function isThenable(a0) {
return Boolean(a0?.then && typeof a0.then === "function");
}
export function isVueViewModel(a0) {
return !((typeof a0 === "object" ? a0 === null : typeof a0 !== "object") || !(a0.__isVue || a0._isVue || a0.__v_isVNode));
}