code: function replace(str, modules) {
      var replacements;
  
      if (arguments.length === 1) {
          return patternReg.and(str);
      }
  
      replacements = runModules(str, modules);
  
      return applyReplacements(str, replacements);
  }
docs: This function can be used in two ways:
  
  - To create a new queue with replacement modules. Just pass a single pattern.
  - To applies all given replacement modules on the target string.
  
  @param {string|RegExp} str string or pattern
  @param {Array<ReplacementModule>=} modules
  @returns {string|patternReg}