@actualwave/is-function 中文文档教程

发布于 6 年前 浏览 14 项目主页 更新于 2 年前

isFunction

isFunction() 是对之前我使用的 instanceof 的简单包装,

typeof value === 'function'

看起来 使用 typeof 应该更快。 因为我不喜欢到处放字符串文字,所以我决定将它包装成一个函数。

isFunction

The isFunction() is a simple wrapper over

typeof value === 'function'

Previously I was using instanceof but it seems using typeof should faster. And since I do not like putting string literal here and there, I've decided to wrap it into a function.

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文