Tests whether a function is an generator.
npm i @urban/is-generator
import isGenerator from '@urban/is-generator'
function * gen () {}
function noop () {}
isGenerator(gen) // => true
isGenerator(noop) // => false
The MIT License (MIT). Copyright (c) Urban Faubion.