function isGeneratorObject
Jump to headingisGeneratorObject(object: unknown): object is Generator
Returns true
if the value is a generator object as returned from a
built-in generator function.
This only reports back what the JavaScript engine is seeing;
in particular, the return value may not match the original source code if
a transpilation tool was used.
function* foo() {}
const generator = foo();
util.types.isGeneratorObject(generator); // Returns true
Parameters Jump to heading
Jump to headingobject: unknown
Return Type Jump to heading
object is Generator