$ gnpm install is-generator-fn
Check if something is a generator function
$ npm install is-generator-fn
import isGeneratorFunction from 'is-generator-fn';
isGeneratorFunction(function * () {});
//=> true
isGeneratorFunction(function () {});
//=> false
Copyright 2013 - present © cnpmjs.org | Home |