Gazebo_simulation-Frontend/node_modules/is-generator-fn/index.js

12 lines
275 B
JavaScript

'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]';
};