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

45 lines
1.3 KiB
JavaScript

// Metro module 1396 (f1397).
import * as _hasToStringTagShams from "./hasToStringTagShams";
import * as _callBoundIntrinsic from "./callBoundIntrinsic";
import * as _Module542 from "./Module542";
import * as _Module573 from "./Module573";
let exports2;
let c1157_2, c1157_3, c1157_4, c1157_5;
if (_hasToStringTagShams()) {
c1157_2 = _callBoundIntrinsic("RegExp.prototype.exec");
c1157_3 = {};
const throwRegexMarker = function throwRegexMarker() {
throw c1157_3;
};
const r17 = {
toString: throwRegexMarker,
valueOf: throwRegexMarker
};
c1157_4 = r17;
if (typeof Symbol.toPrimitive === "symbol") {
r17[Symbol.toPrimitive] = throwRegexMarker;
}
exports2 = function isRegex(a0) {
if (a0 && typeof a0 === "object") {
const r8 = _Module542(a0, "lastIndex");
if (r8 && _Module573(r8, "value")) {
try {
c1157_2(a0, c1157_4);
} catch ($e) {
return $e === c1157_3;
}
return void 0;
}
return false;
}
return false;
};
} else {
c1157_5 = _callBoundIntrinsic("Object.prototype.toString");
exports2 = function isRegex(a0) {
const r1 = a0 ? typeof a0 !== "object" ? typeof a0 !== "function" : typeof a0 !== "object" : !a0;
return r1 ? !r1 : c1157_5(a0) === "[object RegExp]";
};
}
module.exports = exports2;