您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

12 行
275 B

  1. 'use strict';
  2. var toString = Object.prototype.toString;
  3. module.exports = function (fn) {
  4. if (typeof fn !== 'function') {
  5. return false;
  6. }
  7. return (fn.constructor && fn.constructor.name === 'GeneratorFunction') ||
  8. toString.call(fn) === '[object GeneratorFunction]';
  9. };