Options
All
  • Public
  • Public/Protected
  • All
Menu

Module isFunction

Index

References

Functions Lang

References

Renames and re-exports __type

Lang Functions

  • isFunction(value: any): value is Function
  • Checks if value is classified as a Function object.

    since

    5.5.0

    example
    isFunction(class Any{})
    // => true

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

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

    isFunction(function * Any() {})
    // => true

    isFunction(Math.round)
    // => true

    isFunction(/abc/)
    // => false

    Parameters

    • value: any

      The value to check.

    Returns value is Function

    Returns true if value is a function, else false.