is-generator-fn
Check if something is a generator function
Last updated 3 years ago by sindresorhus .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-generator-fn 
SYNC missed versions from official npm registry.

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

Current Tags

  • 3.0.0                                ...           latest (3 years ago)

4 Versions

  • 3.0.0                                ...           3 years ago
  • 2.1.0                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           9 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |