Checks if value is a Generator i.e Object [Generator] {}, what a GeneratorFunction returns
Generator
Object [Generator] {}
GeneratorFunction
const myGeneratorFunction = function* (arg1) { yield arg1 } const myGenerator = myGeneratorFunction() z.isGenerator(myGenerator) // true
z.isAsyncGenerator(). The AsyncGenerator is NOT included, only pure Generator!
z.isAsyncGenerator()
AsyncGenerator
Checks if value is a
Generator
i.eObject [Generator] {}
, what aGeneratorFunction
returnsSee
z.isAsyncGenerator()
. TheAsyncGenerator
is NOT included, only pureGenerator
!