All @lilith/* packages should publish to forge.nasty.sh only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
18 lines
380 B
JavaScript
18 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;
|
|
};
|
|
|