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

41 lines
1.1 KiB
JavaScript

// Metro module 1394 (f1395).
import * as _regexTester from "./regexTester";
import * as _hasToStringTagShams from "./hasToStringTagShams";
import * as _callBoundIntrinsic from "./callBoundIntrinsic";
import * as _Module546 from "./Module546";
let c1155_2;
let c1155_3 = _regexTester(/^\s*(?:function)?\*/);
let c1155_4 = _hasToStringTagShams();
let c1155_5 = _callBoundIntrinsic("Object.prototype.toString");
let c1155_6 = _callBoundIntrinsic("Function.prototype.toString");
module.exports = function isGeneratorFunction(a0) {
if (typeof a0 !== "function") {
return false;
}
if (c1155_3(c1155_6(a0))) {
return true;
}
if (c1155_4) {
if (_Module546) {
if (c1155_2 === void 0) {
const r9 = (function() {
let r8;
if (c1155_4) {
try {
r8 = Function("return function*() {}")();
} catch ($e) {
return void 0;
}
return r8;
}
return false;
})();
c1155_2 = !!r9 && _Module546(r9);
}
return _Module546(a0) === c1155_2;
}
return false;
}
return c1155_5(a0) === "[object GeneratorFunction]";
};