We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Check if value is a generator function.
Similar: is, isAsync, isGenerator.
function isGenerator(v) // v: a value
const xasyncfn = require('extra-async-function'); function* naturalNumbers() { for (var i=0;; ++i) yield i; } xasyncfn.isGenerator(naturalNumbers); // → true xasyncfn.isGenerator(() => 0); // → false