Function functions

  • Creates an array of function property names from own enumerable properties of object.

    Parameters

    • object: any

      The object to inspect.

    Returns string[]

    Returns the function names.

    Since

    5.12.0

    See

    [[functionsIn]]

    Example

    function Foo() {
    this.a = () => 'a'
    this.b = () => 'b'
    }

    Foo.prototype.c = () => 'c'

    functions(new Foo)
    // => ['a', 'b']