@lesjoursfr/browser-tools
    Preparing search index...

    Function replaceAllText

    • Replaces text in a string, using a regular expression or search string.

      Parameters

      • node: HTMLElement

        the node to process

      • searchValue: string | RegExp

        A string or regular expression to search for. If searchValue is a regex, then it must have the global (g) flag set, or a TypeError is thrown.

      • replacer: string | ((substring: string, ...args: any[]) => string)

        A string containing the text to replace or a function that returns the replacement text.

      • textOnly: boolean = false

        If true, any HTML will be rendered as text. Defaults to false

      Returns void