Function isGeneratorFunction

Checks and returns true, if value is either a:

  • GeneratorFunction, eg function* () {}
  • OR AsyncGeneratorFunction async function* () {}

z.isAsyncGeneratorFunction for the more specific one