is-generator-function-name
v1.0.0
Published
Check that given value have `GeneratorFunction` name or displayName.
Downloads
1,529
Readme
is-generator-function-name
Check that given value have
GeneratorFunction
name 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.