I played with generators in Nodejs v0.11.2 and I\'m wondering how I can check that argument to my function is generator function.
I found this way typeof f ===
typeof f ===
function isGenerator(target) { return target[Symbol.toStringTag] === 'GeneratorFunction'; }
or
function isGenerator(target) { return Object.prototype.toString.call(target) === '[object GeneratorFunction]'; }