Skip to content

replaceAllAsync<ReplaceGroupArguments>

Asynchronously replaces all occurrences of a search string or pattern with the results of an asynchronous replacer function.

Import:

import { replaceAllAsync } from '@mnaoumov/typescript-lib/string';

Signature:

function replaceAllAsync(params: ReplaceAllAsyncParams<ReplaceGroupArguments>): Promise<string>

Parameters:

Parameter Type Description
params ReplaceAllAsyncParams<ReplaceGroupArguments> The parameters.

Returns: Promise<string> — A Promise that resolves to the string with all replacements made.


Links to this page: