UNPKG

ut2

Version:

一个现代 JavaScript 实用工具库。[点击查看在线文档]。

15 lines (11 loc) 345 B
'use strict'; var getTag = require('./internals/getTag.js'); var native = require('./internals/native.js'); function isFunction(value) { if (typeof value === 'function') { return true; } var tag = getTag(value); return native.functionTags.some(function (item) { return item === tag; }); } module.exports = isFunction;