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 xfunction = require('extra-function'); function* naturalNumbers() { for (var i=0;; ++i) yield i; } xfunction.isGenerator(naturalNumbers); // → true xfunction.isGenerator(() => 0); // → false