#319·co

isGeneratorFunction will return true when the obj is a generator

Author: lovetingyuanCreated Jul 24, 2017Updated Jul 24, 2017
javascript
function* foo() {}
isGeneratorFunction(foo()) // will return true, is it normal?

I think if a value is a GeneratorFunction, it must be a function at first. thanks!