githubEdit

is-generator-fn

Check if something is a generator functionarrow-up-right

Install

$ npm install is-generator-fn

Usage

const isGeneratorFn = require('is-generator-fn');

isGeneratorFn(function * () {});
//=> true

isGeneratorFn(function () {});
//=> false

License

MIT © Sindre Sorhusarrow-up-right

Last updated

Was this helpful?