decord/source/__polyfill/01xxx/module_1445.js
github-actions a36fe4ec9c chore: update source for alpha 347.0
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-14 20:04:03 +00:00

45 lines
1.3 KiB
JavaScript

// Module ID: 1445
// Function ID: 1446
// Dependencies: [1446, 1444, 1314, 1286]
// Module 1445
import _mod1286 from "module_1286" /* 1286 */;
import callBoundIntrinsic from "callBoundIntrinsic" /* 1314 */;
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 (_mod1286) {
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(1286)(tmp6);
const tmp7 = tmp6 && tmp3(1286)(tmp6);
}
return tmp3(1286)(fn) === closure_2;
} else {
return false;
}
} else {
return "[object GeneratorFunction]" === closure_5(fn);
}
};