Value to be checked
True if the value is a GeneratorFunction, false otherwise
This function checks if the provided value is a GeneratorFunction, which is a special type of function
that returns a Generator and can be used with the yield
keyword. Note that this function does not
check if the function is an async function or an async generator function. And when using TypeScript
and targetting earlier versions of JavaScript, the type of the function may NOT be GeneratorFunction
and instead be a regular function.
Checks if the provided value is a GeneratorFunction