whole_func_string: function replace(target, replaceWith) {
      function escapeRegExp(str) {
          return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
      }
      return target instanceof RegExp
          ? value => value.replace(target, replaceWith)
          : replace(new RegExp(escapeRegExp(target), "g"), replaceWith);
  }
func_code_string: function replace(target, replaceWith) {
      function escapeRegExp(str) {
          return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
      }
      return target instanceof RegExp
          ? value => value.replace(target, replaceWith)
          : replace(new RegExp(escapeRegExp(target), "g"), replaceWith);
  }
func_documentation_string: Replace all instances in a string that match a given string or regular expression