Function getAllObjectFunctionNames

  • Get all functions on an object and its prototype chain (so we don't miss any class methods or any object methods). Note that the functions on the final item in the prototype chain (i.e., Object) are skipped to avoid including functions like __defineGetter__, __defineSetter__, toString, etc.

    Parameters

    • obj: { [property: string]: unknown }

      Object whose functions to get

    • _objId: string = 'obj'

      Optional ID of the object to use for debug logging

    Returns Set<string>

    Array of all function names on an object