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