@pengzhanbo/utils - v3.7.3
    Preparing search index...

    Function isFunction

    • Checks if the input is a function.

      检查输入是否为函数。

      Type Parameters

      • T extends (...args: any[]) => any

        extends (...args: any[]) => any - The type of elements in the array / 数组元素的类型

      Parameters

      • v: unknown

        The value to check. 要检查的值

      Returns v is T

      True if the value is a function, false otherwise. 如果值为函数则返回 true,否则返回 false

      isFunction(() => {}) // => true
      isFunction({}) // => false