Files
khalij-pay/node_modules/generator-function/legacy.js
2025-10-23 21:52:07 +03:30

19 lines
380 B
JavaScript

'use strict';
/** @type {GeneratorFunctionConstructor | false} */
var cached;
/** @type {import('./index.js')} */
module.exports = function getGeneratorFunction() {
if (typeof cached === 'undefined') {
try {
// eslint-disable-next-line no-new-func
cached = Function('return function* () {}')().constructor;
} catch (e) {
cached = false;
}
}
return cached;
};