Home

Awesome

is-es6-generator-function npmjs.com The MIT License

Check that given value is GeneratorFunction

code climate standard code style travis build status coverage status dependency status

Install

npm i is-es6-generator-function --save
npm test

Usage

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

See also

Contributing

Pull 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.

Charlike Make Reagent new message to charlike freenode #charlike

tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github