UNPKG

generator-function

Version:

A function that returns the normally hidden `GeneratorFunction` constructor

9 lines (5 loc) 228 B
'use strict'; // eslint-disable-next-line no-extra-parens, no-empty-function const cached = /** @type {GeneratorFunctionConstructor} */ (function* () {}.constructor); /** @type {import('.')} */ module.exports = () => cached;