is-generator-fn
v3.0.0 generator function func fn is check detect yield type and 1 more...
is-generator-fn
Check if something is a generator function
Install
$ npm install is-generator-fn
Usage
import isGeneratorFunction from 'is-generator-fn';
isGeneratorFunction(function * () {});
//=> true
isGeneratorFunction(function () {});
//=> false
Related
- is - Type check values
npm i is-generator-fn
Metadata
- MIT
- ^12.20.0 || ^14.13.1 || >=16.0.0
- Sindre Sorhus
- released 8/11/2021