【文件属性】:
文件名称:is-es6-generator-function:检查给定值是否为`GeneratorFunction`
文件大小:7KB
文件格式:ZIP
更新时间:2021-06-03 18:49:46
JavaScript
is-es6-generator-function
检查给定值是否为GeneratorFunction
安装
npm i is-es6-generator-function --save
npm test
用法
有关更多用例,请参阅
var isGeneratorFunction = require ( 'is-es6-generator-function' )
var generator = ( function * ( ) { } ) ( )
var genFunction = function * ( ) { yield 42 }
isGeneratorFunction ( null ) //=> false
isGeneratorFunction ( undefined ) //=> false
isGeneratorFunction ( 42 ) //=> false
is
【文件预览】:
is-es6-generator-function-master
----.travis.yml(316B)
----index.js(637B)
----test.js(1KB)
----package.json(757B)
----CONTRIBUTING.md(1KB)
----LICENSE.md(1KB)
----.gitignore(620B)
----CHANGELOG.md(129B)
----README.md(5KB)
----.editorconfig(397B)