Function isFn

  • Checks if the provided instance is a function.

    Parameters

    • instance: unknown

      The instance to be checked.

    Returns boolean

    true if the instance is a function, false otherwise.

    Example

    const func = () => {};
    const obj = {};

    console.log(isFn(func)); // true
    console.log(isFn(obj)); // false

Generated using TypeDoc