refactor(backend): Functions
This commit is contained in:
parent
5ec62554e3
commit
65c1a5e6b6
57 changed files with 172 additions and 117 deletions
|
@ -6,7 +6,11 @@
|
|||
* @param regex
|
||||
* @param replacementFn
|
||||
*/
|
||||
export async function replaceAsync(str: string, regex: RegExp, replacementFn: (match: string, ...args: string[]) => Promise<string>) {
|
||||
export async function replaceAsync(
|
||||
str: string,
|
||||
regex: RegExp,
|
||||
replacementFn: (match: string, ...args: string[]) => Promise<string>
|
||||
): Promise<string> {
|
||||
const promises: Promise<string>[] = [];
|
||||
|
||||
// First run through matches: add all Promises resulting from the replacement function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue