is-generator-function-name

Check that given value have `GeneratorFunction` name or displayName.

MIT License

Downloads
1.1K
Stars
3
Committers
2

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

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.

Charlike Make Reagent new message to charlike freenode #charlike

Package Rankings
Top 7.81% on Npmjs.org
Badges
Extracted from project README
npmjs.com The MIT License code climate standard code style travis build status coverage status dependency status new message to charlike freenode #charlike tunnckocore.tk keybase tunnckocore tunnckoCore npm tunnckoCore twitter tunnckoCore github
Related Projects