decord/source/__polyfill/01xxx/module_1445.js
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

45 lines
1.3 KiB
JavaScript

// Module ID: 1445
// Function ID: 1446
// Dependencies: [1446, 1444, 1316, 1288]
// Module 1445
import _mod1288 from "module_1288" /* 1288 */;
import callBoundIntrinsic from "callBoundIntrinsic" /* 1316 */;
import _mod1444 from "module_1444" /* 1444 */;
import regexTester from "regexTester" /* 1446 */;
let closure_3 = regexTester(/^\s*(?:function)?\*/);
let closure_4 = _mod1444();
let closure_5 = callBoundIntrinsic("Object.prototype.toString");
let closure_6 = callBoundIntrinsic("Function.prototype.toString");
export default function isGeneratorFunction(fn) {
if (typeof fn !== "function") {
return false;
} else if (closure_3(closure_6(fn))) {
return true;
} else if (closure_4) {
if (_mod1288) {
if (undefined === closure_2) {
const tmp6 = (() => {
if (closure_1_4) {
try {
const _Function = Function;
return Function("return function*() {}")();
} catch (err) {
}
} else {
return false;
}
})();
closure_2 = tmp6 && tmp3(1288)(tmp6);
const tmp7 = tmp6 && tmp3(1288)(tmp6);
}
return tmp3(1288)(fn) === closure_2;
} else {
return false;
}
} else {
return "[object GeneratorFunction]" === closure_5(fn);
}
};