moltres-utils
Version:
Utils for Moltres apps
27 lines (19 loc) • 866 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _baseGetTag = _interopRequireDefault(require("./baseGetTag"));
var _isObject = _interopRequireDefault(require("./isObject"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const isFunction = value => {
if (!(0, _isObject.default)(value)) {
return false;
} // The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
const tag = (0, _baseGetTag.default)(value);
return tag == '[object Function]' || tag == '[object AsyncFunction]' || tag == '[object GeneratorFunction]' || tag == '[object Proxy]';
};
var _default = isFunction;
exports.default = _default;
//# sourceMappingURL=isFunction.js.map
;