is-generator-function (1.1.0)

Published 2026-02-24 13:58:27 +00:00 by atheaadmin

Installation

registry=
npm install is-generator-function@1.1.0
"is-generator-function": "1.1.0"

About this package

is-generator-function Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this a native generator function?

Example

var isGeneratorFunction = require('is-generator-function');
assert(!isGeneratorFunction(function () {}));
assert(!isGeneratorFunction(null));
assert(isGeneratorFunction(function* () { yield 42; return Infinity; }));

Tests

Simply clone the repo, npm install, and run npm test

Dependencies

Dependencies

ID Version
call-bound ^1.0.3
get-proto ^1.0.0
has-tostringtag ^1.0.2
safe-regex-test ^1.1.0

Development Dependencies

ID Version
@arethetypeswrong/cli ^0.17.2
@ljharb/eslint-config ^21.1.1
@ljharb/tsconfig ^0.2.3
@types/for-each ^0.3.3
@types/make-generator-function ^2.0.3
@types/tape ^5.8.0
auto-changelog ^2.5.0
core-js ^2.6.5 || ^3.20.0
encoding ^0.1.13
eslint =8.8.0
for-each ^0.3.3
in-publish ^2.0.1
make-generator-function ^2.0.0
npmignore ^0.3.1
nyc ^10.3.2
safe-publish-latest ^2.0.0
tape ^5.9.0
typescript next
uglify-register ^1.0.1

Keywords

generator generator function es6 es2015 yield function function*
Details
npm
2026-02-24 13:58:27 +00:00
1
Jordan Harband
MIT
latest
11 KiB
Assets (1)
Versions (1) View all
1.1.0 2026-02-24