is-generator-fn
npmv3.0.0Check if something is a generator function
Not recommended for new projects
No — is-generator-fn should not be adopted for new projects. Last published 1855 days ago.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- FMaintenance: grade F, Failing.
Last published 1855 days ago.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 2.8 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding is-generator-fn to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node ^12.20.0 || ^14.13.1 || >=16.0.0
- Module format
- ESM only
- TypeScript
- No bundled types
- Install scripts
- None
Quick start
A usage example from the is-generator-fn README.
import isGeneratorFunction from 'is-generator-fn';
isGeneratorFunction(function * () {});
//=> true
isGeneratorFunction(function () {});
//=> falseis-generator-fn vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| is-generator-fnthis page | 0 | 1 | MIT | 5 years ago |
| is-wsl | 117.6M | 4 | MIT | 19 hours ago |
| is-plain-obj | 112.9M | 1 | MIT | 17 hours ago |
| is-in-ssh | 0 | 1 | MIT | 19 hours ago |
| has-flag | 166.9M | 1 | MIT | 17 hours ago |
| is-glob | 137.4M | 3 | MIT | 16 hours ago |
Dependencies
Declared by is-generator-fn v3.0.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (3)
Used by
Popular packages that depend on is-generator-fn.
Relationship graph
Dependencies (left) and dependents (right) of is-generator-fn.
Frequently installed together
Run multiple promise-returning & async functions with limited concurrency
This packages is a collection of utilities and helper functions
No description provided.
Captures and cleans stack traces
Parameterised tests for Jest
generator async control flow goodness
No description provided.
No description provided.
A set of utility functions for expect and related packages
No description provided.
TypeScript definitions for stack-utils
This package extends `expect` library with `jest-snapshot` matchers. It exports `jestExpect` object, which can be used as standalone replacement of `expect`.
Release history
No releases in the last two years, typically about 858 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 3.0.0latest | 5 years ago | 2.8 KB | MIT |
| 2.1.0 | 7 years ago | 3.2 KB | MIT |
| 2.0.0 | 7 years ago | 2.8 KB | MIT |
| 1.0.0 | 10 years ago | — | MIT |
Overview
is-generator-fn is an npm package that check if something is a generator function. It has 1 known dependents in the graph. The latest version is 3.0.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need check if something is a generator function and value a focused solution.
When not to use it
Consider an alternative if you need to have first-class TypeScript types out of the box, or if a more actively-maintained option better fits your npm stack.
Pros
- Clear open-source license (MIT).
- Lean dependency tree (3 direct dependencies).
Cons
- No bundled TypeScript types (may require a separate @types package).
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use is-generator-fn?
No — is-generator-fn should not be adopted for new projects. Last published 1855 days ago.
How do I install is-generator-fn?
Run `npm install is-generator-fn` to add is-generator-fn to your npm project.
What license is is-generator-fn released under?
is-generator-fn is distributed under the MIT license.
How popular is is-generator-fn?
npm does not publish download counts. Within PackageGraph's crawl, 1 known packages depend on is-generator-fn.
Is is-generator-fn still maintained?
The most recent release of is-generator-fn (v3.0.0) was published 5 years ago.
Does is-generator-fn run install scripts?
No. is-generator-fn does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.