Checks if value is an AsyncGenerator, i.e Object [Generator] {}, what a GeneratorFunction returns:
AsyncGenerator
Object [Generator] {}
GeneratorFunction
const myAsyncGeneratorFunction = async function* (arg1) { yield arg1 } const myAsyncGenerator = await myAsyncGeneratorFunction() z.isAsyncGenerator(myAsyncGenerator) // true
z.isGenerator()
Checks if value is an
AsyncGenerator
, i.eObject [Generator] {}
, what aGeneratorFunction
returns:See
z.isGenerator()