replugged

    Function getComponentBySource

    • Retrieves a component from a module by searching its source code for a specific match. Can search for normal components as well as those wrapped in React.memo or React.forwardRef.

      Type Parameters

      • T

        The expected type of the component to be returned.

      Parameters

      • module: unknown

        The module to search within.

      • match: string | RegExp | ((func: UnknownFunction) => boolean)

        The pattern to match the source against.

      Returns T | undefined

      The first component that matches the given pattern, or undefined if no match is found.

    MMNEPVFCICPMFPCPTTAAATR