Spaces:
Sleeping
Sleeping
File size: 399 Bytes
6655e35 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | 'use strict';
/** @type {import('.').AsyncGeneratorFunctionConstructor | false} */
var cached;
/** @type {import('.')} */
module.exports = function getAsyncGeneratorFunction() {
if (typeof cached === 'undefined') {
try {
// eslint-disable-next-line no-new-func
cached = Function('return async function* () {}')().constructor;
} catch (e) {
cached = false;
}
}
return cached;
};
|