How to use Javascript async/await in semi-asynchronous situations? (e.g. in String.replace) [duplicate]
This question already has answers here: Resolve promises one after another (i.e. in sequence)? (36 answers) Closed 3 days ago. For example I’m doing a RegExp replacement on a body of text: text = text.replace(re, function (match, comment, op1, op2, op3, op4, op5, op6, op7) { if (op1 !== undefined) { log(“processing @@”); parseEnum(config, op1, […]