is-generator-function-name [![npmjs.com][npmjs-img]][npmjs-url] [![The MIT License][license-img]][license-url]
May 26, 2015 ยท View on GitHub
Check that given value have
GeneratorFunctionname or displayName.
Install
npm i is-generator-function-name --save
npm test
Usage
For more use-cases see the tests
var isGeneratorFunctionName = require('is-generator-function-name')
isGeneratorFunctionName({name: 'GeneratorFunction'})
//=> false
isGeneratorFunctionName(function () {})
//=> false
isGeneratorFunctionName(function GeneratorFunction () {})
//=> false
isGeneratorFunctionName(function * () {})
//=> true
isGeneratorFunctionName(function * () { yield 42 })
//=> true
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.