$ npm install is-es6-generator-function
Check that given value is
GeneratorFunction
npm i is-es6-generator-function --save
npm test
For more use-cases see the tests
var isGeneratorFunction = require('is-es6-generator-function')
var generator = (function * () {})()
var genFunction = function * () { yield 42 }
isGeneratorFunction(null) //=> false
isGeneratorFunction(undefined) //=> false
isGeneratorFunction(42) //=> false
isGeneratorFunction('foo') //=> false
isGeneratorFunction(function fn () {}) //=> false
isGeneratorFunction(genFunction) //=> true
isGeneratorFunction(generator) //=> false
GeneratorGeneratorFunction name… more.name or user/repo exists in npm registry or in github as… morekind-of and in bonus functional api.helper-related for generating a list of links to the… morePull requests and stars are always welcome. For bugs and feature requests, please create an issue.
But before doing anything, please read the CONTRIBUTING.md guidelines.
© 2010 - cnpmjs.org x YWFE | Home | YWFE