function doReplacements(text, replacements) {
  for (const replacement of replacements) {
    text = doReplacement(text, replacement[0], replacement[1]);
  }
  return text;
}
@param {string} text
@param {[string|RegExp, string][]} replacements