Files
2020-05-28 11:53:18 -04:00
..
2020-05-28 11:53:18 -04:00
2020-05-28 11:53:18 -04:00
2020-05-28 11:53:18 -04:00
2020-05-28 11:53:18 -04:00

is-generator-fn Build Status

Check if something is a generator function

Install

$ npm install --save is-generator-fn

Usage

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

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

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

License

MIT © Sindre Sorhus