@buildtheearth/bot-utils
    Preparing search index...

    Function replaceAsyncAsync

    Replaces a string with a value asynchronously

    The string to search and replace in

    The value to search for

    The function to process each match, or replacement string

    The replaced string

    • Async

      Parameters

      • string: string

        The string to search and replace in

      • searchValue: string | RegExp

        The value to search for

      • replaceValue: string

        The replacement string

      Returns Promise<string>

      The replaced string

      Replaces a string with a value asynchronously

    • Async

      Parameters

      • string: string

        The string to search and replace in

      • searchValue: string | RegExp

        The value to search for

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

        The function to process each match

      Returns Promise<string>

      The string with the replacements

      Replaces a string with a value asynchronously