张益铭 9064b372e8 docs:更新文档 4 éve
..
test 9064b372e8 docs:更新文档 4 éve
.editorconfig 9064b372e8 docs:更新文档 4 éve
.eslintrc 9064b372e8 docs:更新文档 4 éve
.jscs.json 9064b372e8 docs:更新文档 4 éve
.nvmrc 9064b372e8 docs:更新文档 4 éve
.travis.yml 9064b372e8 docs:更新文档 4 éve
CHANGELOG.md 9064b372e8 docs:更新文档 4 éve
LICENSE 9064b372e8 docs:更新文档 4 éve
Makefile 9064b372e8 docs:更新文档 4 éve
README.md 9064b372e8 docs:更新文档 4 éve
index.js 9064b372e8 docs:更新文档 4 éve
package.json 9064b372e8 docs:更新文档 4 éve

README.md

is-generator-function Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

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