Need private packages and team management tools?Check out npm Teams »

is-generator-fn

2.1.0 • Public • Published

is-generator-fn Build Status

Check if something is a generator function

Install

$ npm install is-generator-fn

Usage

const isGeneratorFn = require('is-generator-fn');
 
isGeneratorFn(function * () {});
//=> true
 
isGeneratorFn(function () {});
//=> false

Related

  • is - Type check values

License

MIT © Sindre Sorhus

Install

npm i is-generator-fn

DownloadsWeekly Downloads

6,910,829

Version

2.1.0

License

MIT

Unpacked Size

3.28 kB

Total Files

5

Last publish

Collaborators

  • avatar