code: function substituteVars(rawText, vars)
  {
      if (!vars)
      {
          return rawText;
      }
      //after loading contents, perform variable substitution
      Object.keys(vars).forEach(function (varName)
      {
          if (vars.hasOwnProperty(varName))
          {
              var varValue = vars[varName];
              rawText = replaceAll(rawText, varName, varValue);
          }
      });
      return rawText;
  }
docs: /*
  Substitutes the chunk variables