@actualwave/is-function 中文文档教程
isFunction
isFunction()
是对之前我使用的 instanceof 的简单包装,
typeof value === 'function'
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.